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

Prevent test suite from modifying contributors' Bundler settings #2083

Merged
merged 2 commits into from
May 23, 2024

Conversation

natematykiewicz
Copy link
Contributor

@natematykiewicz natematykiewicz commented May 22, 2024

Motivation

I install my gems in vendor/bundle. While working on #2082, I had to re-configure my bundle path every time I ran the test suite. I realized it was because the test suite was deleting my local bundler config.

Implementation

I switched the tests to use Bundler.settings.temporary. You can read more about it here:
https://medium.com/@0xcolby/how-does-bundle-install-work-part-1-87a4349c192a

Automated Tests

Current tests still work.

Manual Tests

I can repeatedly run the test suite without having to set my bundle path to vendor/bundle every time.

@natematykiewicz natematykiewicz requested a review from a team as a code owner May 22, 2024 21:58
@andyw8 andyw8 added server This pull request should be included in the server gem's release notes other Changes that aren't bugfixes, enhancements or breaking changes labels May 23, 2024
Copy link
Contributor

@andyw8 andyw8 left a comment

Choose a reason for hiding this comment

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

Thank you!

@andyw8
Copy link
Contributor

andyw8 commented May 23, 2024

@natematykiewicz there's 1 failing test.

@natematykiewicz
Copy link
Contributor Author

natematykiewicz commented May 23, 2024

Sorry about that @andyw8. In #2082 I removed the .rb from the excluded path, and ended up making 2 PRs from the same changes, forgetting that in this PR the excluded path still has .rb on it.

@natematykiewicz
Copy link
Contributor Author

I just pushed a similar commit over to #2082, since that PR is the one that needed to drop the extension, not this one.

@andyw8 andyw8 enabled auto-merge (squash) May 23, 2024 16:55
@andyw8 andyw8 merged commit 85b9e29 into Shopify:main May 23, 2024
18 checks passed
@natematykiewicz natematykiewicz deleted the bundler_temporary branch May 23, 2024 17:10
andyw8 pushed a commit that referenced this pull request May 29, 2024
* Prevent test suite from modifying contributors' Bundler settings

* Fix test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
other Changes that aren't bugfixes, enhancements or breaking changes server This pull request should be included in the server gem's release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants