I just tracked a strange problem I was having with my view specs to ActionController::TemplateAssertions. It is using instance variables @partials, @templates, and @layouts on the test itself. I was populating the @templates variable, which is what my view expects to receive. Since TemplateAssertions doesn't expect this, it fails with a "can't convert" error.
TemplateAssertion's internal variables should not be mixed into the test itself. Agree/disagree?
You need some instance variables to track which templates, partials and layouts have been rendered otherwise the assertions wouldn't work, however they should certainly be prefixed with an underscore to help prevent clashes.
prefix TemplateAssertions ivars (#7459)
Revert "Merge pull request #7797 from senny/7459_prefix_tempalte_asse…
This reverts commit 2bad605.
Reason: This added a regression related with shoulda-matchers, since it
is expecting the instance variable @layouts
This will introduce back #7459 but this stable release will be backward compatible.
Related with #8068.