expect_warn_deprecation matches any message when there's
raise_error(RSpec::Expectations::ExpectationNotMetError) in the example,
e.g.:
it 'prints a deprecation warning when given a value and negated' do
expect_warn_deprecation(/complete nonsense/)
expect { expect(3).not_to matcher }.to fail # where `fail` is a matcher, not Ruby's method
end
expect_warn_deprecation matches any message when there's raise_error(RSpec::Expectations::ExpectationNotMetError) in the example, e.g.:
See https://github.com/rspec/rspec-support/issues/451
This depends on https://github.com/rspec/rspec-expectations/pull/1244 and https://github.com/rspec/rspec-core/pull/2802