RSpec rerun failures
Public
06 May 08:44

In spec/spec_helper.rb

RSpec.configure do |config|
  # ...
  config.example_status_persistence_file_path = 'spec/examples.txt'
  # ...
end

In .gitignore

# ...
spec/examples.txt

In command line

bundle exec rspec spec --only-failures

Now each time you fix some specs and rerun this command it will only test specs that failed on the previous run. This improves red-green-refactor iteration speed without any complex setup or additional tools.

Comments

Joe
aleksander
Naaajs
Joe
aleksander
I made it a public entry