[rspec-users] 'Missing template' when using send_data to render response
chrismear at gmail.com
Mon Mar 16 09:21:09 EDT 2009
Just upgraded to Rails 2.3/RSpec 1.2.0, and I've got a controller that uses
send_data to render a response. In the controller spec, I have:
The send_data method calls 'render' internally, but obviously when I
stub/mock out the send_data method this doesn't get called. So, with the
changes to controller/template isolation in 1.2.0, I now get a 'missing
template' error on this example as the controller tries to render the
Any suggestions to the best way to resolve this? My hunch is that it'll need
an extension to RenderObserver in rspec-rails, but I'm struggling to do the
right thing in my first foray into the RSpec source. Or maybe I shouldn't be
mocking the send_data call at all, but rather then underlying render call?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rspec-users