RSpec 2 on Rails 3
Just a quickie – RSpec 2 is on its way, but if you’re itching to get specs running under Rails 3 you can. The RSpec 2 alpha/beta gems are in the wild, so to get it running under Rails 3, just do the following.
Firstly, install the gems:
$ sudo gem install rspec --prerelease
$ sudo gem install webrat
$ sudo gem install rspec-rails --prerelease
Once this is done, you need to add the gem declarations to your Rails Gemfile:
group :test do
gem "rspec", "2.0.0.a5"
gem "rspec-rails", "2.0.0.a6"
Note, these versions are correct as of 12th Feb, but will change.
Finally, you need to run the newly available generator to create the RSpec structure and helpers:
$ rails g rspec:install
And you should be set. Happy speccing.