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.