super_diff
super_diff copied to clipboard
Premature calculation of `actual` description when generating matcher description
In cases where the example passes, SuperDiff::RSpec::AugmentedMatcher#description
appears to generate the description of the actual
object via a call to matcher_text_builder_args
:
https://github.com/mcmire/super_diff/blob/805537f7b138a82ab45a64e09cac332bf21816c7/lib/super_diff/rspec/augmented_matcher.rb#L43
However, the MatcherTextBuilders::Base#matcher_description
doesn't use said description:
https://github.com/mcmire/super_diff/blob/805537f7b138a82ab45a64e09cac332bf21816c7/lib/super_diff/rspec/matcher_text_builders/base.rb#L30-L39
This can incur a substantial delay in cases where the inspection of the actual
object takes a lot of time (e.g. #160).