aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2016-08-25 04:22:48 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2016-08-25 04:22:48 -0300
commit0510208dd1ff23baa619884c0abcae4d141fae53 (patch)
tree1c2fdc58d710af54ee07fdfbb2ca00a23e16c2be /actionpack/lib/action_controller.rb
parent804f5b3c2af90b69a51209c56739a077f3fb632b (diff)
downloadrails-0510208dd1ff23baa619884c0abcae4d141fae53.tar.gz
rails-0510208dd1ff23baa619884c0abcae4d141fae53.tar.bz2
rails-0510208dd1ff23baa619884c0abcae4d141fae53.zip
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.
Diffstat (limited to 'actionpack/lib/action_controller.rb')
0 files changed, 0 insertions, 0 deletions