Skip to content

Commit

Permalink
Merge pull request #1244 from rspec/fix-deprecation-expectation
Browse files Browse the repository at this point in the history
Fix ill-defined warn expectation
  • Loading branch information
JonRowe authored Dec 18, 2020
2 parents a147a45 + 216db53 commit 4409a7a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/rspec/matchers/legacy_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def failure_message_when_negated; "failure when negative"; end
end

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

Expand All @@ -48,7 +48,7 @@ def failure_message_when_negated; "failure when negative"; end
end

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

Expand Down

0 comments on commit 4409a7a

Please sign in to comment.