[rspec-users] Rails3 + RSpec2 sample project?

David Chelimsky dchelimsky at gmail.com
Sun Feb 7 15:41:13 EST 2010

On Sun, Feb 7, 2010 at 3:48 AM, Jacques Crocker <merbjedi at gmail.com> wrote:
> If anyone has any sort of Rails3 + Rspec2 project sort of working, we
> should get a stripped down sample project on github. Martin did a
> great one for datamapper: http://github.com/snusnu/datamapper_on_rails3.
> I can help getting it organized / tested, but I havent been able to
> get things working quite yet.
> I know its all sort of still in flux at the moment. But any help would
> be appreciated on how to organize rspec with rails3.

I don't have time to do a proper blog post right now, but I'll try to
get something up in a day or two. In the mean time, assuming you have
rails 3 pre already installed:

rails foo
cd foo
echo "gem 'rspec-rails', '>=2.0.0.a5' :group => :test" >> Gemfile
script/rails generate rspec:install

rspec:install installs, among other things, a generator so you can just say:

  script/rails generate model thing name:string

... and you'll get a model spec instead of a rails unit test.

The a5 release only supports model and request (integration - a la
merb) specs, but controllers, views and helpers will be coming soon.


More information about the rspec-users mailing list