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

Commit 216db53

Browse files
committed
Fix ill-defined warn expectation
-["include {:message => (match /legacy\\s+RSpec\\s+matcher/), :call_site => (include \"/home/runner/work/rspec-support/rspec-expectations/spec/rspec/matchers/legacy_spec.rb:31\")}"] +[{:message=> + "#<#<Class:0x000055fcd6e44840>:0x000055fcd6e52bc0> implements a legacy RSpec matcher\nprotocol. For the current protocol you should expose the failure messages\nvia the `failure_message` and `failure_message_when_negated` methods.\n(Used from /home/runner/work/rspec-support/rspec-expectations/spec/rspec/matchers/legacy_spec.rb:31:in `block (4 levels) in <module:Matchers>')\n", + :type=>"legacy_matcher"}] See rspec/rspec-support#452
1 parent a147a45 commit 216db53

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spec/rspec/matchers/legacy_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def failure_message_when_negated; "failure when negative"; end
2727
end
2828

2929
it 'warns about the deprecated protocol' do
30-
expect_warn_deprecation_with_call_site(__FILE__, __LINE__ + 1, /legacy\s+RSpec\s+matcher/)
30+
expect_warn_deprecation(/legacy\s+RSpec\s+matcher.+#{__FILE__}:#{__LINE__ + 1}/m)
3131
expect(true).to matcher
3232
end
3333

@@ -48,7 +48,7 @@ def failure_message_when_negated; "failure when negative"; end
4848
end
4949

5050
it 'warns about the deprecated protocol' do
51-
expect_warn_deprecation_with_call_site(__FILE__, __LINE__ + 1, /legacy\s+RSpec\s+matcher/)
51+
expect_warn_deprecation(/legacy\s+RSpec\s+matcher.+#{__FILE__}:#{__LINE__ + 1}/m)
5252
expect(false).not_to matcher
5353
end
5454

0 commit comments

Comments
 (0)