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

Use vcr to record changelog lookups for better test coverage #7

Merged
merged 2 commits into from
Jul 17, 2024

Conversation

mattbrictson
Copy link
Owner

Before, we used a FakeChangelogLocator when testing. This meant that the logic for looking up changelogs, which is messy and buggy, wasn't being tested.

This PR installs vcr and webmock gems, and updates the existing Report test to use the real changelog lookup algorithm involving HTTP requests.

The resulting vcr cassettes are checked into Git, so that test runs are fast.

@mattbrictson mattbrictson added the 🏠 Housekeeping Non-user facing cleanup and maintenance label Jul 17, 2024
@@ -1,37 +1,37 @@
--- "\e[2;4mname\e[0m \e[2;4mfrom\e[0m \e[2;4mto\e[0m \e[2;4mgroup\e[0m
\ \e[2;4murl\e[0m\n\e[32maddressable\e[0m 2.8.6 → 2.8.\e[32m7\e[0m
\ \e[34mhttp://example/addressable/v2.8.7\e[0m\n\e[32mbigdecimal\e[0m
Copy link
Owner Author

Choose a reason for hiding this comment

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

🗒️ This snapshot needed to be updated because the changelog URLs are no longer fake values.

@mattbrictson mattbrictson changed the title Use vcr to record actual changelog lookups for better test coverage Use vcr to record changelog lookups for better test coverage Jul 17, 2024
@mattbrictson mattbrictson merged commit 4aed01f into main Jul 17, 2024
8 checks passed
@mattbrictson mattbrictson deleted the vcr branch July 17, 2024 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏠 Housekeeping Non-user facing cleanup and maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant