[rspec-users] How to use rspec_scaffold generator with latest rspec gem.

Mohnish J. lists at ruby-forum.com
Fri Mar 11 00:52:27 EST 2011

Hi Cole,

Thanks for the link and yorr reply. Yep , I did want to generate a 
scaffold with all rspec tests.

Pixel wrote in post #986740:
> On Thu, Mar 10, 2011 at 7:49 AM, Mohnish J. <lists at ruby-forum.com>
> wrote:
>> for me using the above RoR configuration.
> Hi Mohnish,
> The rails generator script will produce a list of it's generators if
> you simply type 'rails g' you can get further assistance by typing
> 'rails g generator --help'  such as 'rails g scaffold --help'  I
> suspect that you are wanting to generate a scaffold with all of the
> rspec tests as well, because rails 3 went modular you no longer need a
> special command to get rspec tests, simply by installing the gem and
> including it in both :development and :test environments in your
> Gemfile, your scaffold generator will automatically produce rspec
> tests for you.  First check to make sure the rspec:install generator
> is listed under 'rails g' and that you have run that generator first,
> then you can 'rails g scaffold' and the model/controller/views and
> necessary specs will be generated.
> Rspec 2 docs are a bit of a work in progress at the moment as I
> understand it but there is much to be gleaned from referencing
> http://relishapp.com/rspec before you email the list.  Specifically
> the rspec-rails section.
> Hope that helps,
> Cole

Posted via http://www.ruby-forum.com/.

More information about the rspec-users mailing list