producer-core/Guardfile
Thibault Jouan 47455b9c45 Restrict directories watched by guard
If we watch directories like .git or tmp, guard/listen can get very
slow when running tests generating new events, the adapter will have to
process all of them (and potentially search file system for new files).
2015-04-03 20:27:32 +00:00

15 lines
546 B
Ruby

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