Recipe 9 | Run Your Features Automatically with Guard and Growl |
Problem
You’re in the zone, jumping back and forth between adding new scenarios and filling in step definitions. Every time you have to switch to the command line and rerun Cucumber, it disrupts your train of thought. You want Cucumber to run your tests automatically whenever you save a change to one of your project files.
Ingredients
-
Guard,[55] a Ruby library for watching project files
-
Guard::Cucumber,[56] a Cucumber-aware plug-in for Guard
-
A desktop notification system such as Growl for Mac,[57] Growl for Windows,[58] or Snarl for Linux[59] to tell you when the tests are done
-
ruby_gntp,[60] a Ruby library for sending desktop notifications
Solution
Guard is an open source library ...
Get Cucumber Recipes 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.