Skip to content

Commit 2760d30

Browse files
CopilotGrantBirki
andcommitted
Fix test compatibility with different Ruby versions for hash formatting
Co-authored-by: GrantBirki <[email protected]>
1 parent 17f80ec commit 2760d30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spec/unit/lib/hooks/handlers/error_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
error = described_class.new({ error: "validation_failed" }, 400)
1414
expect(error.body).to eq({ error: "validation_failed" })
1515
expect(error.status).to eq(400)
16-
expect(error.message).to eq("Handler error: 400 - {error: \"validation_failed\"}")
16+
expect(error.message).to match(/^Handler error: 400 - \{.*error.*validation_failed.*\}$/)
1717
end
1818

1919
it "converts status to integer" do

0 commit comments

Comments
 (0)