Skip to content

Commit 7c279ad

Browse files
authored
Merge pull request rails#26114 from kamipo/fix_test_failure
Fix actionview test failure
2 parents 5cb6b88 + 7924be5 commit 7c279ad

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

actionview/lib/action_view/test_case.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def controller_path=(path)
2424
def initialize
2525
super
2626
self.class.controller_path = ""
27-
@request = ActionController::TestRequest.create
27+
@request = ActionController::TestRequest.create(self.class)
2828
@response = ActionDispatch::TestResponse.new
2929

3030
@request.env.delete("PATH_INFO")

actionview/test/actionpack/controller/view_paths_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ def hello_world; render(template: "test/hello_world"); end
2323
end
2424

2525
def setup
26-
@request = ActionController::TestRequest.create
27-
@response = ActionDispatch::TestResponse.new
2826
@controller = TestController.new
27+
@request = ActionController::TestRequest.create(@controller.class)
28+
@response = ActionDispatch::TestResponse.new
2929
@paths = TestController.view_paths
3030
end
3131

0 commit comments

Comments
 (0)