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

Fix diff for compound when transforming actual #1319

Closed
wants to merge 2 commits into from

Conversation

pirj
Copy link
Member

@pirj pirj commented Sep 4, 2021

Previously, we were passing the untransformed actual to the differ.
Now, we take it from the matchers.

fixes #1317
fixes #1406

@pirj pirj self-assigned this Sep 4, 2021
it 'shows the reassigned value in diff' do
expected_failure =
dedent(<<-EOS)
| expected "hello\\nworld" to eq downcase "bonjour\\nmonde"
Copy link
Member Author

Choose a reason for hiding this comment

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

Reassigning works slightly different from redefining - this line either has the original, or the new actual.

Obviously, this is the reason I didn't DRY up those two examples.

@pirj pirj force-pushed the fix-compound-redefined-actual-diff branch from f5c90f1 to dab40b8 Compare September 4, 2021 07:28
@pirj pirj force-pushed the fix-compound-redefined-actual-diff branch from dab40b8 to a4d03fa Compare December 14, 2021 21:50
@pirj pirj force-pushed the fix-compound-redefined-actual-diff branch from a4d03fa to 8a4960e Compare June 2, 2022 19:15
@pirj pirj added the rspec 4 label Jun 3, 2022
@pirj pirj modified the milestones: 4.0, 3.99 Jun 3, 2022
@pirj pirj force-pushed the fix-compound-redefined-actual-diff branch from 8a4960e to 0642760 Compare October 28, 2022 06:05
@pirj
Copy link
Member Author

pirj commented Oct 28, 2022

@JonRowe Any objections to merge this?

Previously, we were passing the untransformed actual to the differ.
Now, we take it from the matchers.

fixes #1317
@pirj pirj force-pushed the fix-compound-redefined-actual-diff branch from 0642760 to 56b9b74 Compare February 24, 2023 14:43
@henrahmagix
Copy link

I manually applied these changes to my local copy of 3.12.2 and it worked 100%! I would loooooove this to get released on the 3.x.x version pretty please?

@pirj
Copy link
Member Author

pirj commented Dec 15, 2023

Would you send a PR to main? I’ away from my computer, but would happily approve the pr

@henrahmagix
Copy link

@pirj Done in #1440, thanks!

@pirj pirj closed this in #1440 Dec 28, 2023
@JonRowe JonRowe deleted the fix-compound-redefined-actual-diff branch January 1, 2024 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants