diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2008-05-01 17:26:31 -0500 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2008-05-01 17:26:31 -0500 |
commit | 926f4648f0628009336c44f4d31019819434e39c (patch) | |
tree | 41832ea22ba2c567cca2cad41db1cb966be090ae /actionpack/test/controller | |
parent | e931394d098714c6a4cbb91b8c8c00bd9d6fb850 (diff) | |
download | rails-926f4648f0628009336c44f4d31019819434e39c.tar.gz rails-926f4648f0628009336c44f4d31019819434e39c.tar.bz2 rails-926f4648f0628009336c44f4d31019819434e39c.zip |
Made the location of the routes file configurable with config.routes_configuration_file (Scott Fleckenstein) [#88 state:resolved]
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/routing_test.rb | 10 |
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 |