After upgrading my Rails application to version 6, rspec stopped stubbing view rendering. (https://relishapp.com/rspec/rspec-rails/v/5-0/docs/controller-specs/views-are-stubbed-by-default)
I have tried several rspec and rspec-rails versions but result is always the same.
The expected behavior is that calling render should result in an empty string, but instead calling a controller action in spec is rendering the template like it would normally.
Calling render_views false in the example group has not effect. render_views? returns false in the example.
When I debug the controller action with binding.pry, in Rails 5, calling render returns "". In Rails 6, calling render renders the real template.
the example is as simple as it can be:
it "is success" do
get 'index'
expect(response).to be_successful
end