File tree 2 files changed +15
-4
lines changed
2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -16,9 +16,11 @@ module ApiRendering
16
16
end
17
17
end
18
18
19
- ActiveSupport . on_load :action_controller_api do
20
- include ActionController ::Helpers
21
- include ActionController ::ImplicitRender
19
+ ActiveSupport . on_load :action_controller do
20
+ if name == 'ActionController::API'
21
+ include ActionController ::Helpers
22
+ include ActionController ::ImplicitRender
23
+ end
22
24
end
23
25
end
24
26
end
Original file line number Diff line number Diff line change 8
8
require "active_support/cache/memory_store"
9
9
require "active_support/json"
10
10
require "active_model"
11
+ require 'action_controller/railtie'
12
+ require 'action_view/railtie'
11
13
12
14
require "active_support/testing/autorun"
13
15
require "mocha/minitest"
@@ -35,4 +37,11 @@ class Racer < Struct.new(:id, :name)
35
37
include ActiveModel ::Conversion
36
38
end
37
39
38
- ActionView ::Template . register_template_handler :jbuilder , JbuilderHandler
40
+ # Instantiate an Application in order to trigger the initializers
41
+ Class . new ( Rails ::Application ) do
42
+ config . secret_key_base = 'secret'
43
+ config . eager_load = false
44
+ end . initialize!
45
+
46
+ # Touch AV::Base in order to trigger :action_view on_load hook before running the tests
47
+ ActionView ::Base . inspect
You can’t perform that action at this time.
0 commit comments