Another way to get test feedback quickly is to allow the tests to run automatically when your code changes. In Ruby, the Guard gem allows you to trigger arbitrary events when files change. It’s a powerful system, and running tests is only a fraction of what it can do. We’re just going to manage basic setup here; full documentation is available online.   Mac users should check out the Mac-specific wiki page to make sure Guard receives file events correctly.
Guard is a generic system for triggering events, and it has separate libraries that make it easy to trigger specific kinds of events, such as starting a test.
To set Guard up, add the Guard gem and any of the dependent libraries to the Gemfile:
group :development ...