diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-08-30 22:27:25 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-09-01 11:30:23 -0700 |
commit | a6e410b7f85f22e6adbc55eb9dd3a494ca7200b2 (patch) | |
tree | d92ed989d4bbb7a5764d2bd7d3c9aba69158b7d2 /test/test_clogger.rb | |
parent | a6978053b9e9f4eff3e54bda6b4aa0c06f707075 (diff) | |
download | clogger-a6e410b7f85f22e6adbc55eb9dd3a494ca7200b2.tar.gz |
We're not Rack::Lint, but we still need to take steps to avoid segfaulting if we host non-Rack::Lint-compliant applications. This also updates the pure variant to fail on bad applications, too.
Diffstat (limited to 'test/test_clogger.rb')
-rw-r--r-- | test/test_clogger.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/test_clogger.rb b/test/test_clogger.rb index d2121da..9cb494a 100644 --- a/test/test_clogger.rb +++ b/test/test_clogger.rb @@ -373,4 +373,11 @@ class TestClogger < Test::Unit::TestCase assert_match %r{#{e}$}m, str end + def test_broken_header_response + str = StringIO.new + app = lambda { |env| [302, [ %w(a) ], []] } + cl = Clogger.new(app, :logger => str, :format => '$sent_http_set_cookie') + assert_raise(TypeError) { cl.call(@req) } + end + end |