Thursday, October 16, 2008

How is a Use Case Different From a User Story? - Alistair provides a way to think about Use Cases and User Stories. In essence, he says that Use Cases provide the overall shape of the application while User Stories provide the details.

Wednesday, October 08, 2008

How do I restore and change gedit key assignments?

Use the vi editor to modify the .gnome2/accelsgedit. Editing the file with gedit does not work; the changes are not saved. I had reassigned my ^s key away from File>Save. I order to get the key assignment back, I re-commented the following line:

(gtk_accel_path "<Actions>/GeditWindowActions/FileSave" "<Control>s")

Sunday, October 05, 2008

RCOV - Covering unit, integration, and functional testing in one analysis.

Add the following code into a file called lib/tasks/rcov.rake. Notice that I used the find to gather the relevant tests then the xargs to form them into a nice line which can be added to the rcov command.

namespace :test do

  desc 'Tracks test coverage with rcov'
  task :coverage => :environment do
    rm_f "coverage"
    rm_f ""

    rcov = "rcov --sort coverage --rails --aggregate --text-summary -Ilib -Itest -T -x gem/*,rcov*"

    files = `find . -name *_test.rb | xargs`

    rcov = "#{rcov} " + files
    puts rcov
    system rcov

    system("firefox coverage/index.html")

The new rake command can be executed using rake test:coverage