[rspec-users] Haml and View tests

Chris Olsen lists at ruby-forum.com
Mon Apr 7 12:17:34 EDT 2008

Does Rspec work nicely with Haml for controller integrated view tests?

I am getting the following error:
ActionView::TemplateError in 'Admin::ListingsController index should get
a 200 OK'
undefined method `photo' for true:TrueClass
On line #2 of admin/listings/_listing.html.haml

    1: %tr
    2:   %td.photo= image_tag(listing.photo.url(:thumb), :class =>

Both photo and the photo.url are stubbed out.

Thanks for the help.
Posted via http://www.ruby-forum.com/.

More information about the rspec-users mailing list