Skip to content

RSpec hanging when matching on http response #160

@tomchipchase

Description

@tomchipchase

We've seen an issue where in a rails request spec we have something like this:

it "returns a failure" do
  post some_path(**args)
  expect(response).to be_created
end

In cases where the spec would fail, it seems to hang forever (I'm not sure if it would eventually complete if I left it, but it hits our CI pipeline timeout limit of 15 minutes).

I've managed to trace it to a method within super_diff when its trying to report the failure, but I've not found the root cause.

We're using version super_diff 0.9.0, with rspec 3.11.0 (and rails 7.0.4). (I can provide our Gemfile.lock if that would be useful).

If anyone else comes across this with the same problem, we've worked around this by using have_http_status(:created) instead.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions