On Thu, Feb 19, 2009 at 2:54 PM, Martin <html-k...@gmx.de> 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?
Here's a start: http://rspec.info/rails/writing/views.html Also: rails foo cd foo script/generate rspec script/generate rspec_scaffold thing name:string Now look at spec/views/things/*.html.erb_spec.rb HTH, David > > Thank you, > Martin > _______________________________________________ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users