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 |
Does the deprecation warning for loose keyword argument matching still make sense?
See the following code:
mocha/lib/mocha/parameter_matchers/positional_or_keyword_hash.rb
Lines 68 to 74 in 50844e9