Imagine you have two templates:
# app/views/users/foo.haml.html
%p ...
# app/views/users/bar.haml.html
%p ...
And a controller that renders these:
MyApp.controllers :users do
get '/herp' do
render 'users/foo'
end
get '/derp' do
render 'users/bar'
end
end
What's the best way to write an RSpec test that asserts that a particular view was rendered by a controller?
Ideally, is there a way to have the test check only that the view would have been rendered, without actually rendering it?