aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/console_app_test.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2008-04-20 15:30:41 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2008-04-20 15:30:41 -0700
commit3b93ca221d3a1b777bd880c18f52010cbd56c18c (patch)
tree7b49713994125de123775102eac2655d7b29b231 /railties/test/console_app_test.rb
parentdaab53d8c0bca1114c1485d0dcc52858a264ab9e (diff)
parent46ab7422d9ebac0d529f71a3a7c2feaf0b9d5dbd (diff)
downloadrails-3b93ca221d3a1b777bd880c18f52010cbd56c18c.tar.gz
rails-3b93ca221d3a1b777bd880c18f52010cbd56c18c.tar.bz2
rails-3b93ca221d3a1b777bd880c18f52010cbd56c18c.zip
Merge commit 'rails/master'
Diffstat (limited to 'railties/test/console_app_test.rb')
-rw-r--r--railties/test/console_app_test.rb21
1 files changed, 12 insertions, 9 deletions
diff --git a/railties/test/console_app_test.rb b/railties/test/console_app_test.rb
index 7615d95498..6cfc907b80 100644
--- a/railties/test/console_app_test.rb
+++ b/railties/test/console_app_test.rb
@@ -13,17 +13,20 @@ require 'console_app'
Test::Unit.run = false
class ConsoleAppTest < Test::Unit::TestCase
- def test_reload_should_fire_preparation_callbacks
- a = b = c = nil
+ uses_mocha 'console reload test' do
+ def test_reload_should_fire_preparation_callbacks
+ a = b = c = nil
- Dispatcher.to_prepare { a = b = c = 1 }
- Dispatcher.to_prepare { b = c = 2 }
- Dispatcher.to_prepare { c = 3 }
+ Dispatcher.to_prepare { a = b = c = 1 }
+ Dispatcher.to_prepare { b = c = 2 }
+ Dispatcher.to_prepare { c = 3 }
+ ActionController::Routing::Routes.expects(:reload)
- reload!
+ reload!
- assert_equal 1, a
- assert_equal 2, b
- assert_equal 3, c
+ assert_equal 1, a
+ assert_equal 2, b
+ assert_equal 3, c
+ end
end
end