test/helper.rb in impression-0.9 vs test/helper.rb in impression-0.10
- old
+ new
@@ -39,9 +39,13 @@
msg = message(msg) { "Expected #{mu_pp(act)} to be in range #{mu_pp(exp_range)}" }
assert exp_range.include?(act), msg
end
def assert_response exp_body, exp_content_type, req
+ status = req.response_status
+ msg = message(msg) { "Expected HTTP status 200 OK, but instead got #{status}" }
+ assert_equal 200, status, msg
+
actual = req.response_body
assert_equal exp_body.gsub("\n", ''), actual&.gsub("\n", '')
return unless exp_content_type