Skip to content
This repository has been archived by the owner on Nov 30, 2024. It is now read-only.

Commit

Permalink
Use a_string_including instead of a multiline regexp
Browse files Browse the repository at this point in the history
  • Loading branch information
nashbridges authored and JonRowe committed Sep 12, 2022
1 parent bc1a687 commit 94e2001
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ module Mocks
expect(dbl).to receive(:kw_args_method).with(1, :required_arg => 2, :optional_arg => 3)
expect do
dbl.kw_args_method(1, {:required_arg => 2, :optional_arg => 3})
end.to fail_with(/expected: \(1, {:optional_arg=>3, :required_arg=>2}\) \(keyword arguments\).*got: \(1, {:optional_arg=>3, :required_arg=>2}\) \(options hash\)/m)
end.to fail_with(a_string_including("expected: (1, {:optional_arg=>3, :required_arg=>2}) (keyword arguments)", "got: (1, {:optional_arg=>3, :required_arg=>2}) (options hash)"))
end
else
it "matches against a hash submitted as a positional argument and received as keyword arguments in Ruby 2.7 or before" do
Expand Down

0 comments on commit 94e2001

Please sign in to comment.