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

ISSUE-456: Disable VERBOSE warnings in test stubs #466

Merged
merged 1 commit into from
Oct 5, 2023

Conversation

fbuys
Copy link
Collaborator

@fbuys fbuys commented Oct 2, 2023

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:

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: whitesmith#465
@fbuys fbuys mentioned this pull request Oct 2, 2023
Copy link
Collaborator

@etagwerker etagwerker left a comment

Choose a reason for hiding this comment

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

@fbuys Looks good, thank you!

@etagwerker etagwerker merged commit 1d20e4f into whitesmith:main Oct 5, 2023
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