ISSUE-456: Disable VERBOSE warnings in test stubs #466
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.
To prevent warning during tests while we deliberately override certain methods.
Warnings include:
rubycritic/test/fakefs_helper.rb:8: warning: method redefined; discarding old flock rubycritic/.bundle/ruby/3.2.0/gems/fakefs-2.4.0/lib/fakefs/file.rb:586: warning: previous definition of flock was here rubycritic/test/lib/rubycritic/commands/compare_test.rb:12: warning: method redefined; discarding old current_branch rubycritic/lib/rubycritic/source_control_systems/git.rb:82: warning: previous definition of current_branch was here
See: #465
An alternative would be to turn warning completely off during test, but I believe warnings to play an important role.
In this case turning them off temporarily seems like a good idea because we are overriding methods specifically for tests.
Check list: