Skip to content

Revisit deprecation warning for loose keyword argument matching #791

@floehopper

Description

@floehopper

Does the deprecation warning for loose keyword argument matching still make sense?

  • Is the wording still appropriate now that strict matching is the default?
  • Does loose keyword matching even work in Ruby v4?
  • Should this be a deprecation warning rather than just a warning? i.e. is it ever going to stop working?

See the following code:

def deprecation_warning(actual, expected)
details1 = "Expectation #{expectation_definition} expected #{hash_type(expected)} (#{expected.mocha_inspect}),".squeeze(' ')
details2 = "but received #{hash_type(actual)} (#{actual.mocha_inspect})."
sentence1 = 'These will stop matching when strict keyword argument matching is enabled.'
sentence2 = 'See the documentation for Mocha::Configuration#strict_keyword_argument_matching=.'
Deprecation.warning([details1, details2, sentence1, sentence2].join(' '))
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions