Guard::Cucumber allows to automatically run Cucumber features when files are modified.
-
Tested on Ruby 1.8.7 & 1.9.2.
Please be sure to have guard installed before continue.
Install the gem:
gem install guard-cucumber
Add it to your Gemfile (inside test group):
gem 'guard-cucumber'
Add guard definition to your Guardfile by running this command:
guard init cucumber
Please read guard usage doc
Cucumber guard can be adapated to all kind of projects. Please read guard doc for more info about Guardfile DSL.
guard 'cucumber' do watch(%r{features/.+\.feature}) watch(%r{features/support/.+}) { 'features' } watch(%r{features/step_definitions/.+}) { 'features' } end
There are several options you can pass to the Cucumber Guard to customize the arguments when calling Cucumber:
:color => false # Disable colored output :drb => true # Enable Spork DRb server :port => 1234 # Set custom Spork port :bundler => false # Don't use "bundle exec" :rvm => ['1.8.7', '1.9.2'] # Directly run your specs on multiple ruby :profile => 'cucumber_profile' # Let cucumber use another profile than the default one :run_all => true # Always run all tests, which is useful to work around a cucumber error where step_definitions aren't included when run over drb
-
Source hosted at GitHub
-
Report issues/Questions/Feature requests on GitHub Issues
Pull requests are very welcome! Make sure your patches are well tested.
Many thanks to the Guard Team and all the authors of the numerous Guards