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 deprecation #463

Merged
merged 2 commits into from
Jun 1, 2020
Merged

Fix deprecation #463

merged 2 commits into from
Jun 1, 2020

Conversation

deivid-rodriguez
Copy link
Member

@deivid-rodriguez deivid-rodriguez commented May 29, 2020

Summary

Trying to fix a deprecation message coming from the database_cleaner gem.

Fixes #459.

Details

My changes consist of:

  • For the usage inside "lib", make sure to use the proper API according to its availabilty. That means using `DatabaseCleaner.cleaners if available.

  • For the usages inside our own features, bump the database_cleaner in use to a high enough version, and switch to DatabaseCleaner.cleaners unconditionally.

Motivation and Context

Remove deprecation messages from test suites.

How Has This Been Tested?

Not yet, I'll start with CI, then test it on my project.

Types of changes

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).

Checklist:

  • I've added tests for my code.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@janko
Copy link
Contributor

janko commented Jun 1, 2020

Thank you for working on this, I would appreciate not seeing this deprecation warning too 👍

@deivid-rodriguez
Copy link
Member Author

No problem!

CI is failing due to an issue in the activerecord adapter of database_cleaner which I'm trying to fix here: DatabaseCleaner/database_cleaner-active_record#43.

@deivid-rodriguez
Copy link
Member Author

Just tried in my library and it works 👍. Setting this as ready.

@deivid-rodriguez deivid-rodriguez marked this pull request as ready for review June 1, 2020 17:01
Copy link
Contributor

@olleolleolle olleolleolle left a comment

Choose a reason for hiding this comment

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

This PR avoids a warning output by a supporting library. Looks good to me!

@deivid-rodriguez
Copy link
Member Author

Great, thanks @olleolleolle!

@deivid-rodriguez deivid-rodriguez merged commit 8c22f37 into master Jun 1, 2020
@deivid-rodriguez deivid-rodriguez deleted the fix_deprecation branch June 1, 2020 17:34
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.

DatabaseCleaner 1.8.x deprecates DatabaseCleaner.connections, which cucumber-rails uses
3 participants