Forum: RSpec how can I get rspec to generate files with rails g model?

648553f5c693d93c9ea2e042857ad22c?d=identicon&s=25 Patrick Collins (patrick99e99)
on 2011-09-13 04:37
(Received via mailing list)
I just added RSpec 2 to a project that has been using test::unit, and I
was
wondering how to get RSpec to automatically build test files for my
models?

when I do rails g rspec:model foo, I just get see CREATE
spec/models/foo_spec.rb (no other files)

if I do rails g model foo, I see "invoke test unit", and a
test/unit/foo_test.rb gets created..

..  Is there something I need to do to get rspec invoked?

Thanks.

Patrick J. Collins
http://collinatorstudios.com
5d38ab152e1e3e219512a9859fcd93af?d=identicon&s=25 David Chelimsky (Guest)
on 2011-09-13 08:13
(Received via mailing list)
On Sep 13, 2011, at 3:34 AM, Patrick J. Collins wrote:

> I just added RSpec 2 to a project that has been using test::unit, and I was
> wondering how to get RSpec to automatically build test files for my models?
>
> when I do rails g rspec:model foo, I just get see CREATE
> spec/models/foo_spec.rb (no other files)
>
> if I do rails g model foo, I see "invoke test unit", and a
> test/unit/foo_test.rb gets created..
>
> ..  Is there something I need to do to get rspec invoked?

See the Configure section on
https://www.relishapp.com/rspec/rspec-rails.

Cheers,
David
This topic is locked and can not be replied to.