rails/rails — pull request #13695 by delwaterman (2014-01-13 14:45:14+00:00)
Title: Fixing bug with assert_template and options :partial and :locals

Addressing Issue: https://github.com/rails/rails/issues/13694

Fixed an issue with assert_template. If you asserted the wrong
partial template, and specified the :locals option it would raise a
NoMethodException with the following error message:

"undefined method `[]' for nil:NilClass"

Altered the method to first check the template was rendered
before checking the locals.

NB: I also noticed that the assert_template with :partial and
:layout option is neither tested nor will it actually work at all.
I opted however to leave it for another day/commit.