rspec/rspec-rails — pull request #522 by martinsvalin (2012-03-30 09:58:58+00:00)
Title: Let local render_views override global setting

If render_views is enabled globally in the spec_helper, it clobbers attempts to disable it locally for specific examples due to the false || true logic.

Instead, only use the global setting if no local render_views was provided.

My use case: I am working on an old project, where render_views has been enabled globally for a long time. I'm trying to isolate new specs as much as possible, so I wanted to disable render_views for some new controller specs. Unfortunately render_views(false) didn't work as I expected it.

Here is a gist with steps to reproduce the behaviour: https://gist.github.com/2249825

I don't think this is the intended behaviour of render_views, so I'm contributing my patch upstream.