Skip to content

Use be_nil and be_true/be_false everywhere in specs #15867

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

Merged

Conversation

straight-shoota
Copy link
Member

Transforms all eq nil and eq true/eq false calls in specs to be_nil and be_true/be_false to enforce a consistent style.
We're already using be_* in the vast majority of cases. Less than 10% of expectations are using the eq style.

This was discovered with ameba's Lint/SpecEqWithBoolOrNilLiteral rule.

@straight-shoota straight-shoota self-assigned this Jun 2, 2025
@straight-shoota straight-shoota changed the title Use be_nil and be_true/be_false in specs Use be_nil and be_true/be_false everywhere in specs Jun 2, 2025
@straight-shoota straight-shoota added this to the 1.17.0 milestone Jun 3, 2025
@straight-shoota straight-shoota merged commit 652d9a9 into crystal-lang:master Jun 4, 2025
43 of 45 checks passed
@straight-shoota straight-shoota deleted the spec/be_nil-be_bool branch June 4, 2025 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants