aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/routing_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller/routing_test.rb')
-rw-r--r--actionpack/test/controller/routing_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb
index 5756c05e2e..640afd58f8 100644
--- a/actionpack/test/controller/routing_test.rb
+++ b/actionpack/test/controller/routing_test.rb
@@ -2341,11 +2341,13 @@ uses_mocha 'route loading' do
def setup
routes.instance_variable_set '@routes_last_modified', nil
silence_warnings { Object.const_set :RAILS_ROOT, '.' }
+ ActionController::Routing::Routes.configuration_file = File.join(RAILS_ROOT, 'config', 'routes.rb')
@stat = stub_everything
end
def teardown
+ ActionController::Routing::Routes.configuration_file = nil
Object.send :remove_const, :RAILS_ROOT
end
@@ -2386,6 +2388,14 @@ uses_mocha 'route loading' do
Inflector.inflections { |inflect| inflect.uncountable('equipment') }
end
+
+ def test_load_with_configuration
+ routes.configuration_file = "foobarbaz"
+ File.expects(:stat).returns(@stat)
+ routes.expects(:load).with("foobarbaz")
+
+ routes.reload
+ end
private
def routes