Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Premature calculation of actual description when generating matcher description #204

Open
jas14 opened this issue Jan 1, 2024 · 0 comments

Comments

@jas14
Copy link
Collaborator

jas14 commented Jan 1, 2024

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).

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant