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 : 
https://github.com/GCorbel/comment-my-projects/blob/master/spec/acceptance/actualities_spec.rb
 
and here : 
https://github.com/GCorbel/comment-my-projects/blob/master/spec/controllers/actualities_controller_spec.rb.

As you can see, I use acceptance DSL 
(http://jeffkreeftmeijer.com/2011/acceptance-testing-using-capybaras-new-rspec-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/.
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to