Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Use the diffable feature from RSpec expectations #11

Merged
merged 1 commit into from
May 29, 2019

Conversation

carlows
Copy link
Contributor

@carlows carlows commented Jul 6, 2018

Related to: #7

This PR enables diffing on the MatchSnapshot matcher described in https://relishapp.com/rspec/rspec-expectations/docs/diffing

You can see how the diffable? method is being used here: https://github.com/rspec/rspec-expectations/blob/add9b271ecb1d65f7da5bc8a9dd8c64d81d92303/lib/rspec/expectations/handler.rb#L38

Result:

image

Copy link

@RoM4iK RoM4iK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yesmeck is this repository alive?


def failure_message
"\nexpected: #{@expect}\n got: #{@actual}\n"
"\nexpected: #{@expected}\n got: #{@actual}\n"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why didn't use attribute readers you have added before?

@fpbouchard
Copy link

Can this be merged @yesmeck ? This is really useful. Thanks!

@sheerun
Copy link

sheerun commented May 29, 2019

Could you merge this please?

@yesmeck yesmeck merged commit 6835b1c into levinmr:master May 29, 2019
@yesmeck
Copy link
Contributor

yesmeck commented May 29, 2019

Released as 0.1.2

@edmorley edmorley mentioned this pull request Jan 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants