rails/rails — pull request #7848 by senny (2012-10-04 19:00:33+00:00)
Title: can't pass :locals to #assert_template without a view test case (#3415)

the documentation on #assert_template states that the :locals option is only available in view test cases:

# In a view test case, you can also assert that specific locals are passed
# to partials:

I added a warning when it's passed in an inapropriate context to prevent a NoMethodError.

I also changed the code to simply ignore the :locals option if @locals is not set. This way the users will get a warning but the tests don't fail.