diff options
Diffstat (limited to 'test/test_clogger_to_path.rb')
-rw-r--r-- | test/test_clogger_to_path.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test_clogger_to_path.rb b/test/test_clogger_to_path.rb index b437695..f74b991 100644 --- a/test/test_clogger_to_path.rb +++ b/test/test_clogger_to_path.rb @@ -14,6 +14,10 @@ class MyBody < Struct.new(:to_path, :closed) def close self.closed = true end + +private + def privtest + end end class TestCloggerToPath < Test::Unit::TestCase @@ -59,6 +63,11 @@ class TestCloggerToPath < Test::Unit::TestCase status, headers, body = app.call(@req) assert_instance_of(Clogger, body) check_body(body) + + assert ! body.respond_to?(:privtest) + assert body.respond_to?(:privtest, true) + assert ! body.respond_to?(:privtest, false) + assert logger.string.empty? assert_equal tmp.path, body.to_path body.close |