2012-07-23 10:37:44 -04:00
|
|
|
# encoding: utf-8
|
|
|
|
|
|
|
|
guard :bundler do
|
|
|
|
watch('Gemfile')
|
|
|
|
end
|
|
|
|
|
2012-12-06 13:53:44 -05:00
|
|
|
guard :rspec, :all_on_start => false do
|
2012-07-23 10:37:44 -04:00
|
|
|
# run all specs if the spec_helper or supporting files files are modified
|
2012-10-26 05:24:29 -04:00
|
|
|
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
|
|
|
|
|
|
|
# run unit specs if associated lib code is modified
|
|
|
|
watch(%r{\Alib/(.+)\.rb\z}) { |m| Dir["spec/unit/#{m[1]}"] }
|
2012-10-26 05:24:29 -04:00
|
|
|
watch("lib/#{File.basename(File.expand_path('../', __FILE__))}.rb") { 'spec/unit' }
|
2012-07-23 10:37:44 -04:00
|
|
|
|
|
|
|
# run a spec if it is modified
|
|
|
|
watch(%r{\Aspec/(?:unit|integration)/.+_spec\.rb\z})
|
|
|
|
end
|