[rspec-users] Testing Controllers in Rspec

guirec c. lists at ruby-forum.com
Wed Feb 27 14:24:30 UTC 2013

I think your are confused with acceptance specs and controllers spec. In 
a controller spec you must to test only your controller in total 
isolation. You can use stubs and mocks to do it. In the acceptance spec 
you must to test all the behaviour at a very high level.

I think to create a record in the database for a feature spec is 
correct. You can see an example of my specs here : 
and here : 

As you can see, I use acceptance DSL 
and factory girl (https://github.com/thoughtbot/factory_girl_rails).

I hope to help you. It's very hard to begin.

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

More information about the rspec-users mailing list