On 19 feb 2009, at 21:54, Martin wrote:
Hi,
I'm trying to test my views using rspec. I want to test my edit- and
new-view also for the case an error occurs (something like "title
can't be blank" and so on).
Can someone point me please to an example where I can see how to
mock my model and stub all methods needed for the view?
If you happen to use Cucumber as well, I strongly suggest you check
the error messages there. First of all, it's easier since you don't
have to go mad stubbing and mucking about (sorry, had to make that
joke :P), and error messages more or less belong into integration
tests. At least, that's my opinion.
cheers,
bartz
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users