-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Refactor go module version finder specs #3687
Conversation
Now that most of the tests that previously resided in update_checker_spec.rb have been moved into latest_version_finder_spec.rb, let's ensure we have a basic test that exercises the collaboration between UpdateChecker and LatestVersionFinder.
Dependabot::GoModules::Version.new("1.2.0-pre2") | ||
) | ||
end | ||
|
||
context "doesn't update indirect dependencies (not supported)" do |
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.
Since UpdateChecker
includes comments specifically about indirect dependencies here, I've left this test here in update_checker_spec.rb
instead of moving it to latest_version_finder_spec.rb.
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.
Thanks for the clean up!
As hinted at in #3661 (comment), this pull request takes the majority of the tests that resided in
go_modules/spec/dependabot/go_modules/update_checker_spec.rb
and moves them intogo_modules/spec/dependabot/go_modules/update_checker/latest_version_finder_spec.rb
.The tests in
update_checker_spec.rb
were exercising functionality that lives inlatest_version_finder.rb
, so it makes more sense for the tests to reside inlatest_version_finder_spec.rb
. 😅To ensure that the higher-level functionality of
UpdateChecker
remains intact, d2d1eec adds a higher-level test to exercise the basic contract ofUpdateChecker#latest_resolvable_version
.