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

Refactor go module version finder specs #3687

Merged
merged 13 commits into from
May 10, 2021

Conversation

jasonrudolph
Copy link
Contributor

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 into go_modules/spec/dependabot/go_modules/update_checker/latest_version_finder_spec.rb.

The tests in update_checker_spec.rb were exercising functionality that lives in latest_version_finder.rb, so it makes more sense for the tests to reside in latest_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 of UpdateChecker#latest_resolvable_version.

@jasonrudolph jasonrudolph requested a review from mctofu May 10, 2021 15:05
@jasonrudolph jasonrudolph self-assigned this May 10, 2021
Dependabot::GoModules::Version.new("1.2.0-pre2")
)
end

context "doesn't update indirect dependencies (not supported)" do
Copy link
Contributor Author

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.

@jasonrudolph jasonrudolph marked this pull request as ready for review May 10, 2021 17:06
@jasonrudolph jasonrudolph requested a review from a team as a code owner May 10, 2021 17:06
Copy link
Contributor

@mctofu mctofu left a 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!

@jasonrudolph jasonrudolph merged commit 828f734 into main May 10, 2021
@jasonrudolph jasonrudolph deleted the refactor-go-module-version-finder-specs branch May 10, 2021 20:37
@mctofu mctofu mentioned this pull request May 11, 2021
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.

2 participants