rspec / rspec-expectations

Provides a readable API to express expected outcomes of a code example
https://rspec.info
MIT License
1.26k stars 397 forks source link

Ruby 2.7 deprecations in `has` matchers #1183

Closed 97jaz closed 4 years ago

97jaz commented 4 years ago

Subject of the issue

Expectations like:

expect(foo).to have_bar(kw: arg)

cause deprecation warnings in Ruby 2.7. Presumably, this is because RSpec::Matchers::BuiltIn::Has accepts and passes on *args but not **args.

Your environment

Steps to reproduce

As mentioned above, this happens with an expectation like:

expect(foo).to have_bar(kw: arg)

Expected behavior

There should be no deprecation warning.

Actual behavior

There is a deprecation warning.

marcandre commented 4 years ago

This issue can be closed now