Skip to content
This repository
Browse code

Missed svn add from [6897]. References #8393.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6898 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 34a5a896e1a55aebb0ae4b99de525c85b9eda2ed 1 parent 3cf2c63
Jeremy Kemper jeremy authored

Showing 1 changed file with 25 additions and 0 deletions. Show diff stats Hide diff stats

  1. +25 0 railties/test/console_app_test.rb
25 railties/test/console_app_test.rb
... ... @@ -0,0 +1,25 @@
  1 +require File.dirname(__FILE__) + '/abstract_unit'
  2 +
  3 +require 'action_controller' # console_app uses 'action_controller/integration'
  4 +
  5 +require 'dispatcher'
  6 +require 'console_app'
  7 +
  8 +# console_app sets Test::Unit.run to work around the at_exit hook in test/unit, which kills IRB
  9 +Test::Unit.run = false
  10 +
  11 +class ConsoleAppTest < Test::Unit::TestCase
  12 + def test_reload_should_fire_preparation_callbacks
  13 + a = b = c = nil
  14 +
  15 + Dispatcher.to_prepare { a = b = c = 1 }
  16 + Dispatcher.to_prepare { b = c = 2 }
  17 + Dispatcher.to_prepare { c = 3 }
  18 +
  19 + reload!
  20 +
  21 + assert_equal 1, a
  22 + assert_equal 2, b
  23 + assert_equal 3, c
  24 + end
  25 +end

0 comments on commit 34a5a89

Please sign in to comment.
Something went wrong with that request. Please try again.