Running Smaller Groups of Tests
Running just some of your tests at once is often useful when debugging. For one thing, you often just care about one or two tests when debugging. Also, if you’re being verbose about printing output to the terminal, then only running one test will spare you from potentially having to wade through a lot of spurious output.
Each tool has its own way to allow you to run one file or one set of tests at once. Also, your editor or IDE probably has a built-in feature or common extension that allows you to run your entire test suite or just some tests directly from the editor.
Running Groups of Examples in RSpec
I recommend using the rspec command directly rather than going through any rake tasks that RSpec defines, because ...
Get Rails 4 Test Prescriptions now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.