1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activejob/lib/active_job
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
..
queue_adapters Added instance variable @queue to JobWrapper. 2016-08-19 17:10:27 +09:00
arguments.rb applies new string literal convention in activejob/lib 2016-08-06 18:40:07 +02:00
base.rb applies new string literal convention in activejob/lib 2016-08-06 18:40:07 +02:00
callbacks.rb applies new string literal convention in activejob/lib 2016-08-06 18:40:07 +02:00
configured_job.rb
core.rb applies new string literal convention in activejob/lib 2016-08-06 18:40:07 +02:00
enqueuing.rb code gardening: removes redundant selfs 2016-08-08 01:12:38 +02:00
exceptions.rb correct exception class in retry_on example [ci skip] 2016-08-20 17:21:14 +09:00
execution.rb applies new string literal convention in activejob/lib 2016-08-06 18:40:07 +02:00
gem_version.rb Start Rails 5.1 development 🎉 2016-05-10 03:46:56 -03:00
logging.rb Add three new rubocop rules 2016-08-16 04:30:11 -03:00
queue_adapter.rb normalizes indentation and whitespace across the project 2016-08-06 20:16:27 +02:00
queue_adapters.rb applies new string literal convention in activejob/lib 2016-08-06 18:40:07 +02:00
queue_name.rb applies remaining conventions across the project 2016-08-06 20:20:22 +02:00
queue_priority.rb applies remaining conventions across the project 2016-08-06 20:20:22 +02:00
railtie.rb applies new string literal convention in activejob/lib 2016-08-06 18:40:07 +02:00
test_case.rb Add load hooks to all tests classes 2016-08-25 04:22:48 -03:00
test_helper.rb applies new string literal convention in activejob/lib 2016-08-06 18:40:07 +02:00
translation.rb
version.rb applies new string literal convention in activejob/lib 2016-08-06 18:40:07 +02:00