Closed cbliard closed 5 months ago
Can you please provide a reproduction script a-la #2502 (comment) ?
I added one in the description. Thanks for pointing to a nice example.
Thanks @pirj and @JonRowe for your reviews and suggestions. I just pushed a fix.
Thanks!
Released in 6.1.4
When using
rack-test
, doing something likeexpect(last_response).to have_http_status(:ok)
would fail with the error "expected a response object, but an instance of Rack::MockResponse was received".This PR creates a
ActionDispatch::TestResponse
from theRack::MockResponse
to makehave_http_status
usable in specs relying onrack-test
to perform requests.It should fix rubocop/rubocop-rspec_rails#20.
Reproduction script: