Spork guard allows to automatically & intelligently start/reload your RSpec/Cucumber Spork server(s).
Compatible with Spork 0.8.4 & 0.9.0.rc2
Tested on Ruby 1.8.6, 1.8.7 & 1.9.2.
Please be sure to have guard installed before continue.
Install the gem:
gem install guard-spork
Add it to your Gemfile (inside test group):
Add guard definition to your Guardfile with:
guard init spork
Please read guard usage doc
Spork guard can be really be adapated to all kind of projects. Please read guard doc for more info about Guardfile DSL.
!!! Attention place Spork guard before rspec/cucumber guards !!!
guard 'spork' do watch('^config/application.rb$') watch('^config/environment.rb$') watch('^config/environments/.*\.rb$') watch('^config/initializers/.*\.rb$') watch('^spec/spec_helper.rb') end
Spork guard automatically detect RSpec/Cucumber/Bundler presence but you can disabled them via:
guard 'spork', :cucumber => false, :bundler => false do ... end
:wait => 30 # Seconds to wait server launch, default 20 :cucumber => false :rspec => false :bundler => false # don't use "bundle exec" :rspec_port => xxxx # default 8989 :cucumber_port => xxxx # default 8990
Pull requests are very welcome! Make sure your patches are well tested. Please create a topic branch for every separate change you make.