From 0cbfd6c28d327304432f7d0c067662b5c1e41a78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Mon, 20 Dec 2010 12:41:49 +0100 Subject: Small changes on AD::Reloader. --- railties/lib/rails/console/app.rb | 3 ++- railties/test/application/console_test.rb | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'railties') diff --git a/railties/lib/rails/console/app.rb b/railties/lib/rails/console/app.rb index 4a988efd82..95c74baae2 100644 --- a/railties/lib/rails/console/app.rb +++ b/railties/lib/rails/console/app.rb @@ -26,6 +26,7 @@ end # reloads the environment def reload!(print=true) puts "Reloading..." if print - ActionDispatch::Reloader.reload! + ActionDispatch::Reloader.cleanup! + ActionDispatch::Reloader.prepare! true end diff --git a/railties/test/application/console_test.rb b/railties/test/application/console_test.rb index 5f84c2b948..793e73556c 100644 --- a/railties/test/application/console_test.rb +++ b/railties/test/application/console_test.rb @@ -31,9 +31,9 @@ class ConsoleTest < Test::Unit::TestCase a = b = c = nil # TODO: These should be defined on the initializer - ActionDispatch::Reloader.to_prepare { a = b = c = 1 } - ActionDispatch::Reloader.to_prepare { b = c = 2 } - ActionDispatch::Reloader.to_cleanup { c = 3 } + ActionDispatch::Reloader.to_cleanup { a = b = c = 1 } + ActionDispatch::Reloader.to_cleanup { b = c = 2 } + ActionDispatch::Reloader.to_prepare { c = 3 } # Hide Reloading... output silence_stream(STDOUT) { reload! } -- cgit v1.2.3