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

Accept colon-style hash in test assertion #732

Merged
merged 1 commit into from
Aug 5, 2024

Conversation

tompng
Copy link
Member

@tompng tompng commented Jul 24, 2024

Hash#inspect is proposed to change to {key: value, non_symbol_key => value} in https://bugs.ruby-lang.org/issues/20433#note-10

This pull request will make test pass in both current hash inspect style and the proposed hash inspect style.

- assert_include(actual, "{:key=>value}")
+ assert_include(actual, { key: value }.inspect)

Patch that change Hash#inspect is here ruby/ruby#10924
rake test passes with colon style inspect patch, but rake test_rendering fails (2 failure).
This does not affect ruby core ci, so I'd like to fix it after Hash#inspect is changed in ruby head.

Hash#inspect is proposed to change to {key: value, non_symbol_key => value} in https://bugs.ruby-lang.org/issues/20433#note-10
@tompng tompng merged commit 1fd73b3 into ruby:master Aug 5, 2024
40 checks passed
@tompng tompng deleted the hash_style_test_fix branch August 5, 2024 15:53
matzbot pushed a commit to ruby/ruby that referenced this pull request Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants