On Mar 10, 2011, at 7:49 AM, Mohnish J. wrote:

> Hi,
> 
> I am a newbie to Rails 3 and Rspec. Kindly excuse my being a novice.
> 
> I am trying to use RSpec with Rails 3. I am using rails 3.0.3 and ruby
> 1.9.2 on ubuntu 10.04 os.
> 
> I am currently referring to the tutorial on :-
> http://www.railsfire.com/article/rspec-behaviour-driven-development-testing-framework.
> This tutorial not only uses old plugins , but old Rails version of 2.x
> also.
> 
> I am unable to use the old rspec generator ( rspec_scaffold ) with rspec
> 2.5 and rspec-rails 2.5 gem. As expected I get the following error as
> given below.
> 
>    mohnish@mohnish-desktop:~/rails_testing/10Mar11/rspec_demo3$ rails g
> rspec_scaffold post title:string body:text
>    Could not find generator rspec_scaffold.
>    mohnish@mohnish-desktop:~/rails_testing/10Mar11/rspec_demo3$
> 
> Could you please tell me how should I give to accordingly for it to work
> for me using the above RoR configuration.

rails generate rspec:install
rails generate scaffold

In Rails 3, once you run the rspec:install generator, the Rails generators 
delegate out to rspec-rails to generate the spec files.

You might also want to check out http://ruby.railstutorial.org/.

Cheers,
David


_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to