From 0ee1cb2cd32bfaf47deaf5440dd5b9cf0915ab6a Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Tue, 2 Oct 2007 05:32:14 +0000 Subject: Ruby 1.9 compat, consistent load paths git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7719 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/controller/dispatcher_test.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'actionpack/test/controller/dispatcher_test.rb') diff --git a/actionpack/test/controller/dispatcher_test.rb b/actionpack/test/controller/dispatcher_test.rb index f2bc091a72..75b99c4d92 100644 --- a/actionpack/test/controller/dispatcher_test.rb +++ b/actionpack/test/controller/dispatcher_test.rb @@ -52,12 +52,12 @@ class DispatcherTest < Test::Unit::TestCase Dependencies.stubs(:load?).returns(false) ActionController::Routing::Routes.expects(:reload).never @dispatcher.unprepared = false - @dispatcher.send(:reload_application) + @dispatcher.send!(:reload_application) assert !@dispatcher.unprepared Dependencies.stubs(:load?).returns(true) ActionController::Routing::Routes.expects(:reload).once - @dispatcher.send(:reload_application) + @dispatcher.send!(:reload_application) assert @dispatcher.unprepared end @@ -69,19 +69,19 @@ class DispatcherTest < Test::Unit::TestCase # Skip the callbacks when already prepared. @dispatcher.unprepared = false - @dispatcher.send :prepare_application + @dispatcher.send! :prepare_application assert_nil a || b || c # Perform the callbacks when unprepared. @dispatcher.unprepared = true - @dispatcher.send :prepare_application + @dispatcher.send! :prepare_application assert_equal 1, a assert_equal 2, b assert_equal 3, c # But when not :load, make sure they are only run once a = b = c = nil - @dispatcher.send :prepare_application + @dispatcher.send! :prepare_application assert_nil a || b || c end @@ -91,7 +91,7 @@ class DispatcherTest < Test::Unit::TestCase Dispatcher.to_prepare(:unique_id) { a = 2 } @dispatcher.unprepared = true - @dispatcher.send :prepare_application + @dispatcher.send! :prepare_application assert_equal 2, a assert_equal nil, b end -- cgit v1.2.3