Skip to content

Commit e788c08

Browse files
committed
Move view paths setting to controller
1 parent b6b6b70 commit e788c08

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

test/abstract_unit.rb

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,7 @@
44
require 'active_record'
55
require 'action_controller/action_caching'
66

7-
FIXTURE_LOAD_PATH = File.join(File.dirname(__FILE__), 'fixtures')
8-
9-
10-
module ActionController
11-
class Base
12-
self.view_paths = FIXTURE_LOAD_PATH
13-
end
14-
end
7+
FIXTURE_LOAD_PATH = File.expand_path('../fixtures', __FILE__)
158

169
module RackTestUtils
1710
def body_to_string(body)

test/caching_test.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ class ActionCachingTestController < CachingController
2424
rescue_from(ActiveRecord::RecordNotFound) { head :not_found }
2525
end
2626

27+
self.view_paths = FIXTURE_LOAD_PATH
28+
2729
# Eliminate uninitialized ivar warning
2830
before_action { @title = nil }
2931

0 commit comments

Comments
 (0)