Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
RSpec: Run Only Failures

RSpec: Run Only Failures

In spec/spec_helper.rb:

RSpec.configure do |config|
  # This setting allows us to only re-run examples that had failures.
  # Usage:
  #   bundle exec rspec --only-failures
  # There's also a `--next-failure` option, which is shorthand for `--only-failures --fail-fast --order defined`.
  # It allows you to repeatedly focus on just one of the currently failing examples, then move on to the next failure.
  config.example_status_persistence_file_path = 'spec/support/examples.txt'


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment