Skip to content

Commit 8e4a09e

Browse files
amatsudakou
authored andcommitted
Monkey-patch ActionView::TestCase via on_load hook
Because Action View is not always in use when running Rails tests
1 parent 7a2cbc9 commit 8e4a09e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/test/unit/rails/test_help.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ class << klass
109109
end
110110
end
111111

112-
ActionView::TestCase.singleton_class.prepend TestUnitRails::ActionViewSubTestCase
112+
ActiveSupport.on_load :action_view_test_case do
113+
ActionView::TestCase.singleton_class.prepend TestUnitRails::ActionViewSubTestCase
114+
end
113115

114116
class ActionDispatch::IntegrationTest
115117
setup do

0 commit comments

Comments
 (0)