Shoulda, finally did

I finally got around to trying Shoulda.  Installation had a few unspoken assumptions.

The Gem should be reference in your environment.rb file.

gem 'thoughtbot-shoulda'

or, depending on rails version

Rails::Initializer.run do |config|
  config.gem thoughtbot-shoulda, :lib => shoulda/rails, :source => http://gems.github.com
end

It also should be referenced in your Rakefile.

begin require 'shoulda/tasks' rescue LoadError end

After adding it to the Rakefile,  you can see a list of tests in textual form, using

rake shoulda:list

Leave a Reply