Skip to content

Commit

Permalink
Configure rspec's --only-failures flag
Browse files Browse the repository at this point in the history
This config stores information about passing/failing tests in examples.txt
And allows to run `rspec --only-failures` that only runs the failed tests
From the previous run
  • Loading branch information
Patrycja-Nowak committed Nov 24, 2023
1 parent fbc9c42 commit 40107fd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions spec/dummy-app/spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@
# triggering implicit auto-inclusion in groups with matching metadata.
config.shared_context_metadata_behavior = :apply_to_host_groups

# Allows RSpec to persist some state between runs in order to support
# the `--only-failures` and `--next-failure` CLI options. We recommend
# you configure your source control system to ignore this file.
config.example_status_persistence_file_path = "spec/examples.txt"

# The settings below are suggested to provide a good initial experience
# with RSpec, but feel free to customize to your heart's content.
=begin
Expand All @@ -54,10 +59,7 @@
# metadata: `fit`, `fdescribe` and `fcontext`, respectively.
config.filter_run_when_matching :focus
# Allows RSpec to persist some state between runs in order to support
# the `--only-failures` and `--next-failure` CLI options. We recommend
# you configure your source control system to ignore this file.
config.example_status_persistence_file_path = "spec/examples.txt"
# Limits the available syntax to the non-monkey patched syntax that is
# recommended. For more details, see:
Expand Down

0 comments on commit 40107fd

Please sign in to comment.