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

Added skip_warning ability to deprecators for tests #2956

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

keshavbiswa
Copy link
Contributor

Motivation / Background

Fixes: #2948

This Pull Request has been created because We want the ability to silence output warnings for Deprecated Generators in tests.

Checklist

Before submitting the PR make sure the following are checked:

  • This Pull Request is related to one change. Changes that are unrelated should be opened in separate PRs.
  • Commit message has a detailed description of what changed and why. If this PR fixes a related issue include it in the commit message. Ex: [Fix #issue-number]
  • Tests are added or updated if you fix a bug, refactor something, or add a feature.
  • Tests and Rubocop are passing before submitting your proposed changes.

If you're proposing a new generator or locale:

  • Double-check the existing generators documentation to make sure the new generator you want to add doesn't already exist.
  • You've reviewed and followed the Contributing guidelines.

Copy link
Contributor

@stefannibrasil stefannibrasil left a comment

Choose a reason for hiding this comment

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

This LGTM, thank you!

@thdaraujo could you give a review when you can? Thanks!

lib/faker/locations/australia.rb Show resolved Hide resolved
lib/helpers/deprecator.rb Show resolved Hide resolved
Copy link
Contributor

@thdaraujo thdaraujo left a comment

Choose a reason for hiding this comment

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

This is just for our own testing purposes, right?

If yes, then it looks good to me - but left a suggestion so we don't use a class variable.

And Faker::Theater still displays a warning, not sure why.

lib/helpers/deprecator.rb Show resolved Hide resolved
lib/helpers/deprecator.rb Outdated Show resolved Hide resolved
@keshavbiswa
Copy link
Contributor Author

@thdaraujo Thanks, I'll take a look at your suggestion and also figure out why you're seeing the deprecation message.

@keshavbiswa
Copy link
Contributor Author

@thdaraujo @stefannibrasil I have fixed the issue and have updated your requested changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add option to silence deprecation warnings when running the tests
3 participants