From ba52748d05da4f95a8f371d628af97b76644bdd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sun, 29 Aug 2010 21:08:14 -0300 Subject: Remove deprecated support to <% form_for %> and several ActionController::Base methods. --- actionpack/test/controller/dispatcher_test.rb | 59 --------------------------- 1 file changed, 59 deletions(-) delete mode 100644 actionpack/test/controller/dispatcher_test.rb (limited to 'actionpack/test/controller/dispatcher_test.rb') diff --git a/actionpack/test/controller/dispatcher_test.rb b/actionpack/test/controller/dispatcher_test.rb deleted file mode 100644 index ebe089aaf4..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 -- cgit v1.2.3