diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-02-27 12:19:23 -0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-02-27 12:19:23 -0800 |
commit | 884068a13ac097450e183f4eca50509f2037c122 (patch) | |
tree | aa10a782253e874f3e059a4f50c22ab7f79306a8 /railties/test | |
parent | 1ceddd951449b8647dff7d2b4301477bc8b6b510 (diff) | |
download | rails-884068a13ac097450e183f4eca50509f2037c122.tar.gz rails-884068a13ac097450e183f4eca50509f2037c122.tar.bz2 rails-884068a13ac097450e183f4eca50509f2037c122.zip |
Skip console test when using minitest
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/console_app_test.rb | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/railties/test/console_app_test.rb b/railties/test/console_app_test.rb index 7a5de5af8f..f11de087e3 100644 --- a/railties/test/console_app_test.rb +++ b/railties/test/console_app_test.rb @@ -11,30 +11,32 @@ require 'dispatcher' require 'console_app' # console_app sets Test::Unit.run to work around the at_exit hook in test/unit, which kills IRB -Test::Unit.run = false - -class ConsoleAppTest < Test::Unit::TestCase - def test_app_method_should_return_integration_session - assert_nothing_thrown do - console_session = app - assert_not_nil console_session - assert_instance_of ActionController::Integration::Session, - console_session +if Test::Unit.respond_to?(:run=) + Test::Unit.run = false + + class ConsoleAppTest < Test::Unit::TestCase + def test_app_method_should_return_integration_session + assert_nothing_thrown do + console_session = app + assert_not_nil console_session + assert_instance_of ActionController::Integration::Session, + console_session + end end - end - def test_reload_should_fire_preparation_callbacks - a = b = c = nil + 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 } - ActionController::Routing::Routes.expects(:reload) + 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 |