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

Allow to check Hash subset in ContainExpectation #7498

Closed
wants to merge 1 commit into from

Conversation

Sija
Copy link
Contributor

@Sija Sija commented Mar 3, 2019

Fixes #7497

expected_value = @expected_value
if expected_value.is_a?(Hash) && actual_value.is_a?(Hash)
expected_value.all? do |key, value|
actual_value[key]? == value
Copy link
Contributor

Choose a reason for hiding this comment

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

This behavior isn't consistent with how includes? works. I don't know what problem it's supposed to solve.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was discussed at length at Gitter as well as in several comments in before-mentioned issue. IMHO giving downvotes before you understand the problem at hand doesn't make much sense and if anything it shows an ill-will you hold for some reason...

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.

2 participants