Skip to content

Instantly share code, notes, and snippets.

@lujanfernaud
Last active January 28, 2020 08:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lujanfernaud/ea16c82bf0a6aea9db9b24edd59e65c4 to your computer and use it in GitHub Desktop.
Save lujanfernaud/ea16c82bf0a6aea9db9b24edd59e65c4 to your computer and use it in GitHub Desktop.
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.
  # https://relishapp.com/rspec/rspec-core/docs/command-line/only-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'
end

Resources:

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