Fix minor spec failures for updated gems#69
Merged
justinhoward merged 1 commit intomasterfrom Mar 12, 2025
Merged
Conversation
98cbcc2 to
735ff6b
Compare
The honeybadger spec was failing on Ruby 2.3 because the honeybadger gem isn't compatible with Ruby 2.3 even though it claims to be. Specs with Redis 5 were failing because of a slight modification of the error message.
735ff6b to
c15bf2c
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR fixes minor spec failures caused by gem compatibility issues by conditionally loading dependencies and updating error message expectations.
- Honeybadger specs are now skipped for Ruby versions below 2.4 and load the gem within a before hook.
- The Gemfile conditionally installs honeybadger based on the Ruby version.
- A require statement for logger is added in log_listener_spec, and the redis_spec test now uses a regex to loosely match the updated error message.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| spec/events/honeybadger_listener_spec.rb | Skip and require honeybadger conditionally based on Ruby version compatibility. |
| Gemfile | Conditionally include the honeybadger gem for Ruby >= 2.4 to resolve incompatibility. |
| spec/events/log_listener_spec.rb | Added require statement for logger to support logger-based tests. |
| spec/patch/redis_spec.rb | Updated error message expectation to use regex for flexibility with updated messages. |
tomzagorski
approved these changes
Mar 12, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The honeybadger spec was failing on Ruby 2.3 because the honeybadger gem isn't compatible with Ruby 2.3 even though it claims to be.
Specs with Redis 5 were failing because of a slight modification of the error message.