Tell Rspec to only show you green dots
originally posted @ agemofablog on 2017–08–20
Rspec offers a handful of different formatting options for test output. The default option is to just show the familiar green dots, yellow stars, and red F’s with which Rspec users are familiar.
However, you can modify the default formatting option in the test suite itself, which means that a user running rspec spec/foo_spec.rb with no formatting option can end up seeing much more output than expected.
Personally, I just want to see green dots, yellow stars, and red F’s. You can force rspec back to the default progress bar format by passing the
--format progress option when using the CLI.
That command would look like rspec spec/foo_spec.rb --format progress
Or, you can run every test in the test suite with rspec --format progress
Now, assuming that all your tests are passing, you should just see a neat line of green dots.
