match_when_negated
does not handle expectation failures like match
does
#788
Labels
match_when_negated
does not handle expectation failures like match
does
#788
The definition of
match
in the matcher DSL rescuesExpectationNotMetError
and returnsfalse
, allowing expectations to be used inmatch
blocks:rspec-expectations/lib/rspec/matchers/dsl.rb
Lines 64 to 65 in 6717b72
However,
match_when_negated
does not do this:rspec-expectations/lib/rspec/matchers/dsl.rb
Lines 76 to 81 in 6717b72
This should be fixed, as these two methods should have parity with respect to how expectation failures are treated.
Note that I'm currently working on some edits in this area as part of #776 so whoever works on this may want to hold off until that PR is merged to reduce the likliehood of merge conflicts.
The text was updated successfully, but these errors were encountered: