about summary refs log tree commit homepage
path: root/test/unit/test_response.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/test_response.rb')
-rw-r--r--test/unit/test_response.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/unit/test_response.rb b/test/unit/test_response.rb
index 8abc86c..1d47c57 100644
--- a/test/unit/test_response.rb
+++ b/test/unit/test_response.rb
@@ -60,7 +60,7 @@ class ResponseTest < Test::Unit::TestCase
     out = StringIO.new
     HttpResponse.write(out,[200, {"X-Whatever" => "stuff"}, []])
     assert out.closed?
-    assert_match(/^Status: 200 OK\r\nX-Whatever: stuff\r\n/, out.string)
+    assert_equal 1, out.string.split(/\r\n/).grep(/^Status: 200 OK/i).size
   end
 
   # we always favor the code returned by the application, since "Status"
@@ -71,7 +71,7 @@ class ResponseTest < Test::Unit::TestCase
     header_hash = {"X-Whatever" => "stuff", 'StaTus' => "666" }
     HttpResponse.write(out,[200, header_hash, []])
     assert out.closed?
-    assert_match(/^Status: 200 OK\r\nX-Whatever: stuff\r\n/, out.string)
+    assert_equal 1, out.string.split(/\r\n/).grep(/^Status: 200 OK/i).size
     assert_equal 1, out.string.split(/\r\n/).grep(/^Status:/i).size
   end