diff options
author | Rick Olson <technoweenie@gmail.com> | 2007-06-15 23:28:51 +0000 |
---|---|---|
committer | Rick Olson <technoweenie@gmail.com> | 2007-06-15 23:28:51 +0000 |
commit | 9d4225f1298bebacc04cc0055b180c6b2926c024 (patch) | |
tree | 807de561d10e6ecead72aa854cb1cf07391d4dc5 /railties/test/dispatcher_test.rb | |
parent | 1ddaec1e68ae35509d665dbfc5d7f9ae87f41962 (diff) | |
download | rails-9d4225f1298bebacc04cc0055b180c6b2926c024.tar.gz rails-9d4225f1298bebacc04cc0055b180c6b2926c024.tar.bz2 rails-9d4225f1298bebacc04cc0055b180c6b2926c024.zip |
Fixed that dispatcher preparation callbacks only run once in production mode. Mock Routes.reload so that dispatcher preparation callback tests run. [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7033 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/test/dispatcher_test.rb')
-rw-r--r-- | railties/test/dispatcher_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/railties/test/dispatcher_test.rb b/railties/test/dispatcher_test.rb index ad5a4d6275..3267314b03 100644 --- a/railties/test/dispatcher_test.rb +++ b/railties/test/dispatcher_test.rb @@ -27,11 +27,18 @@ class DispatcherTest < Test::Unit::TestCase Dispatcher.send(:preparation_callbacks_run=, false) Object.const_set :ApplicationController, nil + class << ActionController::Routing::Routes + alias_method :old_reload, :reload + def reload() end + end end def teardown Object.send :remove_const, :ApplicationController ENV['REQUEST_METHOD'] = nil + class << ActionController::Routing::Routes + alias_method :reload, :old_reload + end end def test_ac_subclasses_cleared_on_reset |