Skip to content

Modernize RSpec tests to use expect syntax exclusively#146

Merged
hownowstephen merged 2 commits into
mainfrom
cleanup/modernize-rspec-syntax
May 22, 2026
Merged

Modernize RSpec tests to use expect syntax exclusively#146
hownowstephen merged 2 commits into
mainfrom
cleanup/modernize-rspec-syntax

Conversation

@hownowstephen
Copy link
Copy Markdown
Contributor

@hownowstephen hownowstephen commented May 22, 2026

Summary

  • Converted all .should / .should_not calls to expect().to / expect().not_to across all spec files
  • Restricted spec_helper.rb to :expect syntax only (removed :should)
  • No test logic changes — pure syntax modernization

Test plan

  • All 130 examples pass
  • Zero .should occurrences remain in spec files
  • RuboCop clean

Note

Low Risk
Low risk: changes are limited to test-suite assertion syntax and RSpec configuration, with no production code or API behavior modified.

Overview
Updates specs to use expect(...).to/not_to exclusively, replacing all legacy .should/.should_not assertions across api_client_spec, base_client_spec, and client_spec.

Tightens spec_helper.rb to enforce expect-only syntax for both expectations and mocks, preventing future should-style assertions from being added.

Reviewed by Cursor Bugbot for commit 17a2862. Bugbot is set up for automated code reviews on this repo. Configure here.

Convert all .should/.should_not to expect().to/expect().not_to
and restrict spec_helper to :expect syntax only.
@hownowstephen hownowstephen merged commit bf6e657 into main May 22, 2026
9 checks passed
@hownowstephen hownowstephen deleted the cleanup/modernize-rspec-syntax branch May 22, 2026 18:42
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