2012-07-23 10:37:44 -04:00
|
|
|
# encoding: utf-8
|
|
|
|
|
|
|
|
guard :bundler do
|
|
|
|
watch('Gemfile')
|
|
|
|
end
|
|
|
|
|
2014-01-18 17:53:07 -05:00
|
|
|
guard :rspec, :all_after_pass => false, :all_on_start => false, :cmd => 'bundle exec rspec --fail-fast --seed 0' do
|
|
|
|
# run all specs if the spec_helper or supporting files files are modified
|
|
|
|
watch('spec/spec_helper.rb') { 'spec/unit' }
|
|
|
|
watch(%r{\Aspec/(?:lib|support|shared)/.+\.rb\z}) { 'spec/unit' }
|
2012-07-23 10:37:44 -04:00
|
|
|
|
2014-01-18 17:53:07 -05:00
|
|
|
watch(%r{lib/.*.rb}) { 'spec/unit' }
|
2012-07-23 10:37:44 -04:00
|
|
|
|
2014-01-18 17:53:07 -05:00
|
|
|
# run a spec if it is modified
|
|
|
|
watch(%r{\Aspec/.+_spec\.rb\z})
|
2012-07-23 10:37:44 -04:00
|
|
|
end
|