-
Notifications
You must be signed in to change notification settings - Fork 990
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
Convert the spec for Bundler::UpdateChecker to use project based fixtures. #3370
Conversation
Aha, I forgot I'll need to commit a stubbed version of |
92e50a6
to
5689bbb
Compare
# Load project files prepended with the bundler version, which is currently only ever bundler1 | ||
def bundler_project_dependency_files(project) | ||
project_dependency_files(File.join("bundler1", project)) | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method provides a forward compatible way to load any fixtures modified in this PR, I left any existing calls to project_dependency_files
alone to avoid bloating the diff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right on 🤙
I've reviewed the changes to the tests, and based on them passing trust that the fixtures are 💯
@@ -27,6 +27,9 @@ | |||
|
|||
def project_dependency_files(project) | |||
project_path = File.expand_path(File.join("../../spec/fixtures/projects/bundler1", project)) | |||
|
|||
raise "Fixture does not exist for project: '#{project}'" unless Dir.exist?(project_path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙌
This PR extracts from #3350
It prepares the way for bundler version detection by ensuring we can readily produce builds against lockfiles with the correct
BUNDLED WITH
values based on test parameters.Methodology
In order to verify the change over, I used a helper shim to force any tests that called
fixture
to load gemfiles to raise, e.g.A large number of the
bundler1
fixtures already existed, so it was just a case of generating any missing files, checking their naming lined up and then finally grepping the file for_fixture_name
to ensure no test cases were quietly failing over to the top-level dependency files.