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 global use of must_~ method to _(xxx).must_ #28

Merged

Conversation

hamadata
Copy link
Contributor

minitestのメソッドの使い方が非推奨になったため、修正しました。

DEPRECATED: global use of must_be_instance_of from /home/hamada/dev/gem/gimei/spec/gimei_spec.rb:21. Use _(obj).must_be_instance_of instead. This will fail in Minitest 6.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 325f1fb on hamadata:fix-deprecated-global-use-of-must_be into eeae738 on willnet:master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 325f1fb on hamadata:fix-deprecated-global-use-of-must_be into eeae738 on willnet:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 325f1fb on hamadata:fix-deprecated-global-use-of-must_be into eeae738 on willnet:master.

@willnet
Copy link
Owner

willnet commented Oct 23, 2019

@hamadata must_be_instance_of以外のところも変更入ってますが、他もwarningでてます?

@hamadata
Copy link
Contributor Author

must_~ の箇所で発生しています。

ちょっとながいですが参考のためログを

➜  gimei git:(master) bundle exec rake
[Coveralls] Set up the SimpleCov formatter.
[Coveralls] Using SimpleCov's default settings.
<main>:114: warning: shadowing outer local variable - ch
<main>:128: warning: shadowing outer local variable - ch
<main>:153: warning: shadowing outer local variable - str
<main>:175: warning: shadowing outer local variable - str
<main>:197: warning: shadowing outer local variable - str
<main>:203: warning: shadowing outer local variable - str
<main>:211: warning: shadowing outer local variable - str
<main>:219: warning: shadowing outer local variable - str
<main>:225: warning: shadowing outer local variable - str
<main>:101: warning: character class has duplicated range
/home/hamada/dev/gem/gimei/spec/gimei_spec.rb:31: warning: ambiguous first argument; put parentheses or a space even after `/' operator
/home/hamada/dev/gem/gimei/spec/gimei_spec.rb:37: warning: ambiguous first argument; put parentheses or a space even after `/' operator
/home/hamada/dev/gem/gimei/spec/gimei_spec.rb:43: warning: ambiguous first argument; put parentheses or a space even after `/' operator
/home/hamada/dev/gem/gimei/spec/gimei_spec.rb:49: warning: ambiguous first argument; put parentheses or a space even after `/' operator
/home/hamada/dev/gem/gimei/spec/gimei_spec.rb:55: warning: ambiguous first argument; put parentheses or a space even after `/' operator
/home/hamada/dev/gem/gimei/spec/gimei_spec.rb:61: warning: ambiguous first argument; put parentheses or a space even after `/' operator
/home/hamada/dev/gem/gimei/spec/gimei_spec.rb:67: warning: ambiguous first argument; put parentheses or a space even after `/' operator
Run options: --seed 59148

# Running:

DEPRECATED: global use of must_be_instance_of from /home/hamada/dev/gem/gimei/spec/gimei_spec.rb:79. Use _(obj).must_be_instance_of instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_be_instance_of from /home/hamada/dev/gem/gimei/spec/gimei_spec.rb:151. Use _(obj).must_be_instance_of instead. This will fail in Minitest 6.
.<main>:139: warning: character class has duplicated range
/home/hamada/dev/gem/gimei/spec/name_spec.rb:135: warning: character class has duplicated range
DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/name_spec.rb:135. Use _(obj).must_match instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_be_instance_of from /home/hamada/dev/gem/gimei/spec/name_spec.rb:73. Use _(obj).must_be_instance_of instead. This will fail in Minitest 6.
.<main>:139: warning: character class has duplicated range
/home/hamada/dev/gem/gimei/spec/address_spec.rb:7: warning: character class has duplicated range
DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/address_spec.rb:7. Use _(obj).must_match instead. This will fail in Minitest 6.
<main>:139: warning: character class has duplicated range
/home/hamada/dev/gem/gimei/spec/address_spec.rb:8: warning: character class has duplicated range
DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/address_spec.rb:8. Use _(obj).must_match instead. This will fail in Minitest 6.
<main>:139: warning: character class has duplicated range
/home/hamada/dev/gem/gimei/spec/address_spec.rb:9: warning: character class has duplicated range
DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/address_spec.rb:9. Use _(obj).must_match instead. This will fail in Minitest 6.
<main>:139: warning: character class has duplicated range
/home/hamada/dev/gem/gimei/spec/address_spec.rb:10: warning: character class has duplicated range
DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/address_spec.rb:10. Use _(obj).must_match instead. This will fail in Minitest 6.
<main>:139: warning: character class has duplicated range
/home/hamada/dev/gem/gimei/spec/address_spec.rb:11: warning: character class has duplicated range
DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/address_spec.rb:11. Use _(obj).must_match instead. This will fail in Minitest 6.
<main>:139: warning: character class has duplicated range
/home/hamada/dev/gem/gimei/spec/address_spec.rb:12: warning: character class has duplicated range
DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/address_spec.rb:12. Use _(obj).must_match instead. This will fail in Minitest 6.
<main>:139: warning: character class has duplicated range
/home/hamada/dev/gem/gimei/spec/address_spec.rb:13: warning: character class has duplicated range
DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/address_spec.rb:13. Use _(obj).must_match instead. This will fail in Minitest 6.
<main>:139: warning: character class has duplicated range
/home/hamada/dev/gem/gimei/spec/address_spec.rb:14: warning: character class has duplicated range
DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/address_spec.rb:14. Use _(obj).must_match instead. This will fail in Minitest 6.
<main>:139: warning: character class has duplicated range
/home/hamada/dev/gem/gimei/spec/address_spec.rb:16: warning: character class has duplicated range
DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/address_spec.rb:16. Use _(obj).must_match instead. This will fail in Minitest 6.
<main>:139: warning: character class has duplicated range
/home/hamada/dev/gem/gimei/spec/address_spec.rb:17: warning: character class has duplicated range
DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/address_spec.rb:17. Use _(obj).must_match instead. This will fail in Minitest 6.
<main>:139: warning: character class has duplicated range
/home/hamada/dev/gem/gimei/spec/address_spec.rb:18: warning: character class has duplicated range
DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/address_spec.rb:18. Use _(obj).must_match instead. This will fail in Minitest 6.
<main>:139: warning: character class has duplicated range
/home/hamada/dev/gem/gimei/spec/address_spec.rb:19: warning: character class has duplicated range
DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/address_spec.rb:19. Use _(obj).must_match instead. This will fail in Minitest 6.
<main>:139: warning: character class has duplicated range
/home/hamada/dev/gem/gimei/spec/address_spec.rb:20: warning: character class has duplicated range
DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/address_spec.rb:20. Use _(obj).must_match instead. This will fail in Minitest 6.
<main>:139: warning: character class has duplicated range
/home/hamada/dev/gem/gimei/spec/address_spec.rb:21: warning: character class has duplicated range
DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/address_spec.rb:21. Use _(obj).must_match instead. This will fail in Minitest 6.
.<main>:139: warning: character class has duplicated range
/home/hamada/dev/gem/gimei/spec/name_spec.rb:117: warning: character class has duplicated range
DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/name_spec.rb:117. Use _(obj).must_match instead. This will fail in Minitest 6.
.<main>:139: warning: character class has duplicated range
/home/hamada/dev/gem/gimei/spec/gimei_spec.rb:37: warning: character class has duplicated range
DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/gimei_spec.rb:37. Use _(obj).must_match instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_be_instance_of from /home/hamada/dev/gem/gimei/spec/gimei_spec.rb:103. Use _(obj).must_be_instance_of instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/name_spec.rb:49. Use _(obj).must_match instead. This will fail in Minitest 6.
.<main>:139: warning: character class has duplicated range
/home/hamada/dev/gem/gimei/spec/name_spec.rb:55: warning: character class has duplicated range
DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/name_spec.rb:55. Use _(obj).must_match instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_be_instance_of from /home/hamada/dev/gem/gimei/spec/gimei_spec.rb:91. Use _(obj).must_be_instance_of instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/gimei_spec.rb:67. Use _(obj).must_match instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_be_instance_of from /home/hamada/dev/gem/gimei/spec/gimei_spec.rb:73. Use _(obj).must_be_instance_of instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_be_instance_of from /home/hamada/dev/gem/gimei/spec/gimei_spec.rb:9. Use _(obj).must_be_instance_of instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_equal from /home/hamada/dev/gem/gimei/spec/gimei_spec.rb:13. Use _(obj).must_equal instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/gimei_spec.rb:109. Use _(obj).must_match instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_be_instance_of from /home/hamada/dev/gem/gimei/spec/name_spec.rb:21. Use _(obj).must_be_instance_of instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_equal from /home/hamada/dev/gem/gimei/spec/name_spec.rb:25. Use _(obj).must_equal instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_equal from /home/hamada/dev/gem/gimei/spec/name_spec.rb:111. Use _(obj).must_equal instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_be_instance_of from /home/hamada/dev/gem/gimei/spec/name_spec.rb:107. Use _(obj).must_be_instance_of instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_equal from /home/hamada/dev/gem/gimei/spec/name_spec.rb:99. Use _(obj).must_equal instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_be_instance_of from /home/hamada/dev/gem/gimei/spec/name_spec.rb:95. Use _(obj).must_be_instance_of instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_be_instance_of from /home/hamada/dev/gem/gimei/spec/gimei_spec.rb:97. Use _(obj).must_be_instance_of instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/gimei_spec.rb:115. Use _(obj).must_match instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_be_instance_of from /home/hamada/dev/gem/gimei/spec/gimei_spec.rb:163. Use _(obj).must_be_instance_of instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_be_instance_of from /home/hamada/dev/gem/gimei/spec/name_spec.rb:79. Use _(obj).must_be_instance_of instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/name_spec.rb:43. Use _(obj).must_match instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/name_spec.rb:175. Use _(obj).must_match instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_be_instance_of from /home/hamada/dev/gem/gimei/spec/gimei_spec.rb:21. Use _(obj).must_be_instance_of instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_equal from /home/hamada/dev/gem/gimei/spec/gimei_spec.rb:25. Use _(obj).must_equal instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/name_spec.rb:129. Use _(obj).must_match instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/address_spec.rb:27. Use _(obj).must_match instead. This will fail in Minitest 6.
DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/address_spec.rb:28. Use _(obj).must_match instead. This will fail in Minitest 6.
DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/address_spec.rb:29. Use _(obj).must_match instead. This will fail in Minitest 6.
DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/address_spec.rb:30. Use _(obj).must_match instead. This will fail in Minitest 6.
DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/address_spec.rb:32. Use _(obj).must_match instead. This will fail in Minitest 6.
DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/address_spec.rb:33. Use _(obj).must_match instead. This will fail in Minitest 6.
DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/address_spec.rb:34. Use _(obj).must_match instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/address_spec.rb:53. Use _(obj).must_match instead. This will fail in Minitest 6.
DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/address_spec.rb:55. Use _(obj).must_match instead. This will fail in Minitest 6.
DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/address_spec.rb:56. Use _(obj).must_match instead. This will fail in Minitest 6.
DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/address_spec.rb:57. Use _(obj).must_match instead. This will fail in Minitest 6.
DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/address_spec.rb:59. Use _(obj).must_match instead. This will fail in Minitest 6.
DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/address_spec.rb:60. Use _(obj).must_match instead. This will fail in Minitest 6.
DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/address_spec.rb:61. Use _(obj).must_match instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/name_spec.rb:37. Use _(obj).must_match instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_be_instance_of from /home/hamada/dev/gem/gimei/spec/gimei_spec.rb:145. Use _(obj).must_be_instance_of instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_be_instance_of from /home/hamada/dev/gem/gimei/spec/gimei_spec.rb:127. Use _(obj).must_be_instance_of instead. This will fail in Minitest 6.
.<main>:139: warning: character class has duplicated range
/home/hamada/dev/gem/gimei/spec/name_spec.rb:31: warning: character class has duplicated range
DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/name_spec.rb:31. Use _(obj).must_match instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_be_instance_of from /home/hamada/dev/gem/gimei/spec/gimei_spec.rb:121. Use _(obj).must_be_instance_of instead. This will fail in Minitest 6.
.<main>:139: warning: character class has duplicated range
/home/hamada/dev/gem/gimei/spec/gimei_spec.rb:43: warning: character class has duplicated range
DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/gimei_spec.rb:43. Use _(obj).must_match instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/gimei_spec.rb:55. Use _(obj).must_match instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_be_instance_of from /home/hamada/dev/gem/gimei/spec/gimei_spec.rb:133. Use _(obj).must_be_instance_of instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/gimei_spec.rb:61. Use _(obj).must_match instead. This will fail in Minitest 6.
.<main>:139: warning: character class has duplicated range
/home/hamada/dev/gem/gimei/spec/name_spec.rb:151: warning: character class has duplicated range
DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/name_spec.rb:151. Use _(obj).must_match instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/name_spec.rb:141. Use _(obj).must_match instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_be_instance_of from /home/hamada/dev/gem/gimei/spec/gimei_spec.rb:85. Use _(obj).must_be_instance_of instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_be_instance_of from /home/hamada/dev/gem/gimei/spec/gimei_spec.rb:139. Use _(obj).must_be_instance_of instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/gimei_spec.rb:49. Use _(obj).must_match instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/name_spec.rb:123. Use _(obj).must_match instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/name_spec.rb:85. Use _(obj).must_match instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/name_spec.rb:163. Use _(obj).must_match instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_equal from /home/hamada/dev/gem/gimei/spec/name_spec.rb:13. Use _(obj).must_equal instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_be_instance_of from /home/hamada/dev/gem/gimei/spec/name_spec.rb:9. Use _(obj).must_be_instance_of instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/name_spec.rb:61. Use _(obj).must_match instead. This will fail in Minitest 6.
.<main>:139: warning: character class has duplicated range
/home/hamada/dev/gem/gimei/spec/gimei_spec.rb:31: warning: character class has duplicated range
DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/gimei_spec.rb:31. Use _(obj).must_match instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/address_spec.rb:40. Use _(obj).must_match instead. This will fail in Minitest 6.
DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/address_spec.rb:41. Use _(obj).must_match instead. This will fail in Minitest 6.
DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/address_spec.rb:42. Use _(obj).must_match instead. This will fail in Minitest 6.
DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/address_spec.rb:43. Use _(obj).must_match instead. This will fail in Minitest 6.
DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/address_spec.rb:45. Use _(obj).must_match instead. This will fail in Minitest 6.
DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/address_spec.rb:46. Use _(obj).must_match instead. This will fail in Minitest 6.
DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/address_spec.rb:47. Use _(obj).must_match instead. This will fail in Minitest 6.
.<main>:139: warning: character class has duplicated range
/home/hamada/dev/gem/gimei/spec/name_spec.rb:169: warning: character class has duplicated range
DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/name_spec.rb:169. Use _(obj).must_match instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_be_instance_of from /home/hamada/dev/gem/gimei/spec/gimei_spec.rb:157. Use _(obj).must_be_instance_of instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/name_spec.rb:67. Use _(obj).must_match instead. This will fail in Minitest 6.
.DEPRECATED: global use of must_match from /home/hamada/dev/gem/gimei/spec/name_spec.rb:157. Use _(obj).must_match instead. This will fail in Minitest 6.
.

Finished in 0.022757s, 2592.6106 runs/s, 6679.2679 assertions/s.

59 runs, 152 assertions, 0 failures, 0 errors, 0 skips
[Coveralls] Outside the CI environment, not sending data.

@willnet
Copy link
Owner

willnet commented Oct 24, 2019

寿司ゆき:thanks

@willnet willnet merged commit be49132 into willnet:master Oct 24, 2019
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.

3 participants