Is there a way to do integration tests with Rspec without using Cucumber? I prefer using just plain old Webrat. Thanks.
A:
As far as I know Rspec is perfectly capable of testing views and controllers as part of integration tests. A quick look around the internet shows this article at Robby on Rails on view testing and some of the Rdocs within RSpec might help.
Hope this points you in the right direction - I'm afraid I use cucumber myself.
Ryan Neufeld
2009-06-13 02:38:00
+2
A:
The latest version of RSpec-Rails (1.2.7) now has integration support. Upgrade then start adding specs to spec/integration or use the 'integration_spec' generator. Configure Webrat in spec/spec_helper.rb and you're set!
Interesting. I wonder why they incorporated integration specs to rspec, given the popularity of cucumber.
gsmendoza
2009-06-25 12:24:44
There's many places where Cucumber would be overkill, like testing internal APIs, for example.
2009-07-14 17:12:05