aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2009-09-26 19:57:36 -0500
committerJoshua Peek <josh@joshpeek.com>2009-09-26 19:57:36 -0500
commit198081a639deded3df8a1a526cee66e951fb51ec (patch)
tree49f0401750c36ca254a5add6082613dd09ea22db /actionpack
parent1f7270057596592946a877cd029d95760ba3e5ee (diff)
downloadrails-198081a639deded3df8a1a526cee66e951fb51ec.tar.gz
rails-198081a639deded3df8a1a526cee66e951fb51ec.tar.bz2
rails-198081a639deded3df8a1a526cee66e951fb51ec.zip
Remove deprecated calls to Dispatcher.to_prepare
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/test/controller/dispatcher_test.rb15
1 files changed, 5 insertions, 10 deletions
diff --git a/actionpack/test/controller/dispatcher_test.rb b/actionpack/test/controller/dispatcher_test.rb
index 39e6f7d273..8d974cb745 100644
--- a/actionpack/test/controller/dispatcher_test.rb
+++ b/actionpack/test/controller/dispatcher_test.rb
@@ -43,16 +43,11 @@ class DispatcherTest < Test::Unit::TestCase
dispatch
end
- # Stub out dispatch error logger
- class << Dispatcher
- def log_failsafe_exception(status, exception); end
- end
-
def test_prepare_callbacks
a = b = c = nil
- Dispatcher.to_prepare { |*args| a = b = c = 1 }
- Dispatcher.to_prepare { |*args| b = c = 2 }
- Dispatcher.to_prepare { |*args| c = 3 }
+ ActionDispatch::Callbacks.to_prepare { |*args| a = b = c = 1 }
+ ActionDispatch::Callbacks.to_prepare { |*args| b = c = 2 }
+ ActionDispatch::Callbacks.to_prepare { |*args| c = 3 }
# Ensure to_prepare callbacks are not run when defined
assert_nil a || b || c
@@ -71,8 +66,8 @@ class DispatcherTest < Test::Unit::TestCase
end
def test_to_prepare_with_identifier_replaces
- Dispatcher.to_prepare(:unique_id) { |*args| Foo.a, Foo.b = 1, 1 }
- Dispatcher.to_prepare(:unique_id) { |*args| Foo.a = 2 }
+ ActionDispatch::Callbacks.to_prepare(:unique_id) { |*args| Foo.a, Foo.b = 1, 1 }
+ ActionDispatch::Callbacks.to_prepare(:unique_id) { |*args| Foo.a = 2 }
dispatch
assert_equal 2, Foo.a