aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/reloader_test.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-12-20 12:41:49 +0100
committerJosé Valim <jose.valim@gmail.com>2010-12-20 12:43:02 +0100
commit0cbfd6c28d327304432f7d0c067662b5c1e41a78 (patch)
tree2e727aa29cb08dc70902302b7ab74afd17c4b361 /actionpack/test/dispatch/reloader_test.rb
parente683ab7c390f26e110387822c7ffb5ac6aafebca (diff)
downloadrails-0cbfd6c28d327304432f7d0c067662b5c1e41a78.tar.gz
rails-0cbfd6c28d327304432f7d0c067662b5c1e41a78.tar.bz2
rails-0cbfd6c28d327304432f7d0c067662b5c1e41a78.zip
Small changes on AD::Reloader.
Diffstat (limited to 'actionpack/test/dispatch/reloader_test.rb')
-rw-r--r--actionpack/test/dispatch/reloader_test.rb25
1 files changed, 5 insertions, 20 deletions
diff --git a/actionpack/test/dispatch/reloader_test.rb b/actionpack/test/dispatch/reloader_test.rb
index 58ef346b5c..995b19030c 100644
--- a/actionpack/test/dispatch/reloader_test.rb
+++ b/actionpack/test/dispatch/reloader_test.rb
@@ -20,16 +20,6 @@ class ReloaderTest < Test::Unit::TestCase
assert_equal 3, c
end
- def test_to_prepare_with_identifier_replaces
- a = b = 0
- Reloader.to_prepare(:unique_id) { |*args| a = b = 1 }
- Reloader.to_prepare(:unique_id) { |*args| a = 2 }
-
- call_and_return_body
- assert_equal 2, a
- assert_equal 0, b
- end
-
class MyBody < Array
def initialize(&block)
@on_close = block
@@ -50,7 +40,7 @@ class ReloaderTest < Test::Unit::TestCase
def test_returned_body_object_always_responds_to_close
body = call_and_return_body
- assert body.respond_to?(:close)
+ assert_respond_to body, :close
end
def test_returned_body_object_behaves_like_underlying_object
@@ -83,10 +73,10 @@ class ReloaderTest < Test::Unit::TestCase
body = call_and_return_body do
[200, { "Content-Type" => "text/html" }, MyBody.new]
end
- assert body.respond_to?(:size)
- assert body.respond_to?(:each)
- assert body.respond_to?(:foo)
- assert body.respond_to?(:bar)
+ assert_respond_to body, :size
+ assert_respond_to body, :each
+ assert_respond_to body, :foo
+ assert_respond_to body, :bar
end
def test_cleanup_callbacks_are_called_when_body_is_closed
@@ -124,11 +114,6 @@ class ReloaderTest < Test::Unit::TestCase
Reloader.cleanup!
assert !prepared
assert cleaned
-
- prepared = cleaned = false
- Reloader.reload!
- assert prepared
- assert cleaned
end
private