# File test/test_writer.rb, line 41 def test_response @response.set_header('Content-Type', 'text/html') @response.start_body @response << "<html>\n" @response << "Hello world.\n" @response << "</html>\n" @writer.close messg = "HTTP/1.1 200 OK\r\n" messg << "Content-Type: text/html\r\n" messg << "\r\n" messg << "<html>\n" messg << "Hello world.\n" messg << "</html>\n" assert_equal(messg, @write_messg) assert_equal(1, @flush_call) assert_match(@log_info, %"^client - - \[.*\] GET /hello/world HTTP/1.1 200 28 - -$") end