Skip to content

Premature calculation of actual description when generating matcher description #204

Description

@jas14

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions