rails--rails/actionmailer/lib
Rafael Mendonça França 0510208dd1
Add load hooks to all tests classes
Usually users extends tests classes doing something like:

    ActionView::TestCase.include MyCustomTestHelpers

This is bad because it will load the ActionView::TestCase right aways
and this will load ActionController::Base making its on_load hooks to
execute early than it should.

One way to fix this is using the on_load hooks of the components like:

    ActiveSupport.on_load(:action_view) do
      ActionView::TestCase.include MyCustomTestHelpers
    end

The problem with this approach is that the test extension will be only
load when ActionView::Base is loaded and this may happen too late in the
test.

To fix this we are adding hooks to people extend the test classes that
will be loaded exactly when the test classes are needed.
2016-08-25 04:22:48 -03:00
..
action_mailer Add load hooks to all tests classes 2016-08-25 04:22:48 -03:00
rails/generators/mailer revises more Lint/EndAlignment offenses 2016-08-08 18:25:11 +02:00
action_mailer.rb applies new string literal convention in actionmailer/lib 2016-08-06 19:01:31 +02:00