The main reason I prefer using RSpec over alternatives like Minitest is that I
find the CLI integration to be much more usable. Since RSpec 3.3, RSpec has
offered the --next-failure
feature. With this option, RSpec will only the
first spec that failed. This is perfect for situations where diffs made
some tests fail, or you just want to stay focused on the current failure.
In order to make this work, RSpec keeps some metadata about your previous runs.
To enable this, add this to your spec_helper.rb
:
https://gist.github.com/79549748dcb86ac91e86112aa6e0f5d7
Unfortunately, rspec --next-failure
required a little too much typing for my
liking. So as of RSpec 3.7, you can now just rspec -n
. A small ergonomics
improvement.
If you love writing well-tested, decoupled, happiness-inducing Ruby and React, we're hiring!