Improve Guardfile:

* Prevent cucumber run on start;
* Force rspec to be executed by bundler.
This commit is contained in:
Thibault Jouan 2014-03-31 08:25:37 +00:00
parent 4d7e11ceeb
commit fdbe19617f

View File

@ -1,10 +1,10 @@
guard :cucumber, cli: '--format pretty --quiet' do guard :cucumber, cli: '--format pretty --quiet', all_on_start: false do
watch(%r{\Afeatures/.+\.feature\z}) watch(%r{\Afeatures/.+\.feature\z})
watch(%r{\Afeatures/support/.+\.rb\z}) { 'features' } watch(%r{\Afeatures/support/.+\.rb\z}) { 'features' }
watch(%r{\Afeatures/step_definitions/.+_steps\.rb\z}) { 'features' } watch(%r{\Afeatures/step_definitions/.+_steps\.rb\z}) { 'features' }
end end
guard :rspec, cmd: 'rspec -f doc' do guard :rspec, cmd: 'bundle exec rspec -f doc' do
watch(%r{\Aspec/.+_spec\.rb\z}) watch(%r{\Aspec/.+_spec\.rb\z})
watch(%r{\Alib/(.+)\.rb\z}) { |m| "spec/#{m[1]}_spec.rb" } watch(%r{\Alib/(.+)\.rb\z}) { |m| "spec/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { 'spec' } watch('spec/spec_helper.rb') { 'spec' }