Fix Ruby 2.7 warning in minitest assert_text#2365
Merged
twalpole merged 1 commit intoteamcapybara:masterfrom Jun 15, 2020
Merged
Fix Ruby 2.7 warning in minitest assert_text#2365twalpole merged 1 commit intoteamcapybara:masterfrom
twalpole merged 1 commit intoteamcapybara:masterfrom
Conversation
In our application at GitHub we were seeing a warning coming from `assert_text` on the latest version and building the source from master. Warning we were seeing: ``` /vendor/gems/2.7.1/ruby/2.7.0/gems/capybara-3.32.2/lib/capybara/minitest.rb:56: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call /vendor/gems/2.7.1/ruby/2.7.0/gems/capybara-3.32.2/lib/capybara/minitest.rb:56:in `assert_text' ``` The warning is only visible when `assert_text` is delegated from minitest which is why I've updated the minitest_spec.rb file to include an argument. I was unable to see or reproduce this warning in the assert text test. I don't really get why `ruby2_keywords` wasn't adequate for this change but from my testing my changes work in Ruby 2.6 and 2.7 and fix the warning in 2.7.
Member
|
Thanks for this. I don't understand why |
Contributor
Author
|
Is this something that I can help backport for the 3.32 series? Let me know if I can help at all with that, or if this will be in a future version 😄 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In our application at GitHub we were seeing a warning coming from
assert_texton the latest version and building the source from master.Warning we were seeing:
The warning is only visible when
assert_textis delegated fromminitest which is why I've updated the minitest_spec.rb file to include
an argument. I was unable to see or reproduce this warning in the assert
text test.
I don't really get why
ruby2_keywordswasn't adequate for this changebut from my testing my changes work in Ruby 2.6 and 2.7 and fix the
warning in 2.7.