Ruby: Implement Herb/IncludesAssertion RuboCop cop - #2397
Merged
Merged
Conversation
🌿 Interactive Playground and Documentation PreviewA preview deployment has been built for this pull request. Try out the changes live in the interactive playground: 🌱 Grown from commit ✅ Preview deployment has been cleaned up. |
@herb-tools/analysis
@herb-tools/browser
@herb-tools/client
@herb-tools/config
@herb-tools/core
@herb-tools/dev-tools
@herb-tools/formatter
herb-language-server
@herb-tools/highlighter
@herb-tools/language-server
@herb-tools/language-service
@herb-tools/linter
@herb-tools/node
@herb-tools/node-wasm
@herb-tools/printer
@herb-tools/rewriter
stimulus-lint
@herb-tools/tailwind-class-sorter
commit: |
marcoroth
force-pushed
the
rubocop-includes-assertion-cop
branch
from
September 10, 2026 14:26
d77796d to
5e3d905
Compare
marcoroth
added a commit
that referenced
this pull request
Sep 11, 2026
Follow up on #2397, which added the `Herb/IncludesAssertion` cop and parked the existing `assert_includes` and `refute_includes` calls in `.rubocop_todo.yml`. This pull request adds the assertion each of those calls will be replaced with, right next to the original, so both run and pass together. It is the first of two pull requests that burn the todo list down. This one only adds, so nothing is removed and the cop stays green. The second one deletes the `assert_includes` and `refute_includes` lines and drops the files from `.rubocop_todo.yml`.
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.
This pull request implements a custom RuboCop cop that flags
assert_includesandrefute_includesin the test suite, so new tests reach for theassert_*_snapshothelpers instead of asserting against a substring of the output.Herb's tests snapshot the whole compiled or rendered output, which keeps a failure showing the entire diff instead of a single matched fragment. This cop keeps that convention enforced as new tests are added.
The cop reports: