rspec/rspec-rails — Issue #455: render_views does not work in Rails 3 as advertised
Author: nateware
Created: 2011-10-24 19:57:02+00:00
State: open

Following the directions here: https://www.relishapp.com/rspec/rspec-rails/docs/controller-specs/render-views

Test code:

describe MapsController do
render_views

describe "Map search" do
it "should return results" do
get :search, :address => "123 Main St, 92109", :distance => 5, :format => :js
response.should render_template('search') # works OK
response.body.should == 'whatever' # response.body always ""
end

Bottom line, even with render_views, response.body is always ""