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.
What github issue is this PR for, if any?
No Issue, concerns local development only.
What changed, and why?
Prior to change, running
bin/rspec
locally would produce following error in my (mac) environment:(Note I did not do what the above error says to do, that was the 'old' way to do it before Rails 7.1, I guess rspec hasn't updated the error?)
So, the only way to run a specific spec or file was to use focus tag (
fit
,fdescribe
, etc...) while runningbin/rails spec
, which runs javascript/css builds each run - annoying if running backed / not changing javascript/css. The focus tag could also be forgotten about and committed.This change allows copy/pasting lines from failure notifications, for example,
bin/rspec path/to/file.rb:23
. Used ENV["CI"] so that CI test run speed is not affected.Also made a change that filters gems from backtrace of spec failures, which aren't very useful. Typically, I only want to see trace of files we have control over. This can be overridden by passing option to rspec
bin/rspec --backtrace
. I added a comment to that effect.