Skip to content
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

Configure RSpec to allow the --only-failures CLI option #379

Merged
merged 1 commit into from
Dec 6, 2023

Conversation

lfdebrux
Copy link
Member

@lfdebrux lfdebrux commented Dec 5, 2023

What problem does this pull request solve?

The --only-failures and --next-failure options in RSpec make it much quicker to re-run tests that have failed, however they need the example_status_persistence_file_path configuration to be set [1].

This commit tells RSpec to save a file examples.txt into the a new folder in the Rails app's tmp folder; this seems like as good a place as any, as it's already ignored by git and docker, and is clearly named.

Things to consider when reviewing

  • Ensure that you consider the wider context.
  • Does it work when run on your machine?
  • Is it clear what the code is doing?
  • Do the commit messages explain why the changes were made?
  • Are there all the unit tests needed?
  • Has all relevant documentation been updated?

The `--only-failures` and `--next-failure` options in RSpec make it much
quicker to re-run tests that have failed, however they need the
`example_status_persistence_file_path` configuration to be set [[1]].

This commit tells RSpec to save a file `examples.txt` into the a new
folder in the Rails app's `tmp` folder; this seems like as good a place
as any, as it's already ignored by git and docker, and is clearly named.

[1]: https://rspec.info/features/3-12/rspec-core/command-line/only-failures/
Copy link

sonarqubecloud bot commented Dec 5, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@lfdebrux lfdebrux added this pull request to the merge queue Dec 6, 2023
Merged via the queue into main with commit f553d18 Dec 6, 2023
6 checks passed
@lfdebrux lfdebrux deleted the ldeb-configure-rspec-only-failures branch December 6, 2023 13:23
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