Closed PanosCodes closed 1 year ago
:wave: Sadly this is a known limitation of the current differ, it compares strings so even if they match it produces a diff between the description and the expected, there is some work to change the differ and it may be improved at one point, but as it stands this is a "can't fix" for the current differ,
Subject of the issue
Why when using
have_attributes
with multiplekind_of
matchers and only one is a fails, it reports all of them as failures.My understanding is when it's time compare the expected with the actual results the differ is given
kind of String
and that is why is reporting it as a failure.Since we use the
RSpec::Mocks::ArgumentMatchers::KindOf
,ObjectFormatter
is matching it withRSpec::Support::ObjectFormatter::DescribableMatcherInspector
and then we get thekind of String
from theKindOf
description.Your environment
Steps to reproduce
Expected behavior
Actual behavior