aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/dispatcher_test.rb
diff options
context:
space:
mode:
authorGonçalo Silva <goncalossilva@gmail.com>2011-03-24 17:21:17 +0000
committerGonçalo Silva <goncalossilva@gmail.com>2011-03-24 17:21:17 +0000
commit9887f238871bb2dd73de6ce8855615bcc5d8d079 (patch)
tree74fa9ff9524a51701cfa23f708b3f777c65b7fe5 /actionpack/test/controller/dispatcher_test.rb
parentaff821508a16245ebc03510ba29c70379718dfb7 (diff)
parent5214e73850916de3c9127d35a4ecee0424d364a3 (diff)
downloadrails-9887f238871bb2dd73de6ce8855615bcc5d8d079.tar.gz
rails-9887f238871bb2dd73de6ce8855615bcc5d8d079.tar.bz2
rails-9887f238871bb2dd73de6ce8855615bcc5d8d079.zip
Merge branch 'master' of https://github.com/rails/rails
Diffstat (limited to 'actionpack/test/controller/dispatcher_test.rb')
-rw-r--r--actionpack/test/controller/dispatcher_test.rb59
1 files changed, 0 insertions, 59 deletions
diff --git a/actionpack/test/controller/dispatcher_test.rb b/actionpack/test/controller/dispatcher_test.rb
deleted file mode 100644
index 7e19bce3b7..0000000000
--- a/actionpack/test/controller/dispatcher_test.rb
+++ /dev/null
@@ -1,59 +0,0 @@
-require 'abstract_unit'
-
-# Ensure deprecated dispatcher works
-class DeprecatedDispatcherTest < ActiveSupport::TestCase
- class DummyApp
- def call(env)
- [200, {}, 'response']
- end
- end
-
- def setup
- ActionDispatch::Callbacks.reset_callbacks(:prepare)
- ActionDispatch::Callbacks.reset_callbacks(:call)
- end
-
- def test_assert_deprecated_to_prepare
- a = nil
-
- assert_deprecated do
- ActionController::Dispatcher.to_prepare { a = 1 }
- end
-
- assert_nil a
- dispatch
- assert_equal 1, a
- end
-
- def test_assert_deprecated_before_dispatch
- a = nil
-
- assert_deprecated do
- ActionController::Dispatcher.before_dispatch { a = 1 }
- end
-
- assert_nil a
- dispatch
- assert_equal 1, a
- end
-
- def test_assert_deprecated_after_dispatch
- a = nil
-
- assert_deprecated do
- ActionController::Dispatcher.after_dispatch { a = 1 }
- end
-
- assert_nil a
- dispatch
- assert_equal 1, a
- end
-
- private
-
- def dispatch(cache_classes = true)
- @dispatcher ||= ActionDispatch::Callbacks.new(DummyApp.new, !cache_classes)
- @dispatcher.call({'rack.input' => StringIO.new('')})
- end
-
-end