diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-05-13 17:45:37 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-05-22 01:54:21 -0700 |
commit | 96122dbcabe96ef0b278c9b5f575ede34d54656a (patch) | |
tree | 38232d6cab0e56ab19506700d05a0987819ffe6c /test/unit/test_response.rb | |
parent | 1e2bbe9f29f2297dacd1f87adedec1033f513aa7 (diff) | |
download | unicorn-96122dbcabe96ef0b278c9b5f575ede34d54656a.tar.gz |
Rack::Lint says they just have to work when to_i is called on the status, so that's what we'll do.
Diffstat (limited to 'test/unit/test_response.rb')
-rw-r--r-- | test/unit/test_response.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/unit/test_response.rb b/test/unit/test_response.rb index 3cb0a41..644a2a7 100644 --- a/test/unit/test_response.rb +++ b/test/unit/test_response.rb @@ -18,6 +18,14 @@ class ResponseTest < Test::Unit::TestCase assert out.length > 0, "output didn't have data" end + def test_response_string_status + out = StringIO.new + HttpResponse.write(out,['200', {}, []]) + assert out.closed? + assert out.length > 0, "output didn't have data" + assert_equal 1, out.string.split(/\r\n/).grep(/^Status: 200 OK/).size + end + def test_response_OFS_set old_ofs = $, $, = "\f\v" |