diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-05-29 21:49:37 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-05-29 21:49:37 +0000 |
commit | 34a5a896e1a55aebb0ae4b99de525c85b9eda2ed (patch) | |
tree | 6ebcb740b829790e3b5b595488bfaf16ea995986 | |
parent | 3cf2c63eee8c8de57b4856c13008979fee2778bf (diff) | |
download | rails-34a5a896e1a55aebb0ae4b99de525c85b9eda2ed.tar.gz rails-34a5a896e1a55aebb0ae4b99de525c85b9eda2ed.tar.bz2 rails-34a5a896e1a55aebb0ae4b99de525c85b9eda2ed.zip |
Missed svn add from [6897]. References #8393.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6898 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r-- | railties/test/console_app_test.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/railties/test/console_app_test.rb b/railties/test/console_app_test.rb new file mode 100644 index 0000000000..0e6019df44 --- /dev/null +++ b/railties/test/console_app_test.rb @@ -0,0 +1,25 @@ +require File.dirname(__FILE__) + '/abstract_unit' + +require 'action_controller' # console_app uses 'action_controller/integration' + +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_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 } + + reload! + + assert_equal 1, a + assert_equal 2, b + assert_equal 3, c + end +end |