Limiting test assertion methods in Core

There used to be a ton of test assertion helpers in Core like
assert_session, assert_cookie, assert_flash, etc. See
for some history. I wasn't around for the extract reason they were
removed, but we don't need a helper method for every possible
situation in Rails. And assert @response.flash[:notice] isn't that

I noticed 2 new patches that fall under this category today.

Any of these kinds of helpers should be plugin territory.

They were pulled out because the API was bloated. Providing access to
sessions and flash and cookies in functional tests removed the need for
almost 30 assertions.


If the goal is to keep the API streamlined, #8793 (assert_charset)
probably isn't a big enough win to bother with. But #8791
(assert_content_type) does allow you to do this:

assert_content_type :js

instead of this:

assert_equal Mime::Type.lookup_by_extension('js').to_s,