Files
bunnyrun/Guardfile
2018-04-07 00:03:25 +01:00

19 lines
493 B
Ruby

# frozen_string_literal: true
group :red_green_refactor, halt_on_fail: true do
guard :rspec, cmd: 'bundle exec rspec' do
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
watch(%r{^spec/.+_spec\.rb$})
watch('spec/spec_helper.rb') { 'spec' }
end
guard :rubocop do
watch(%r{(?:.+/)?\.rubocop(?:_todo)?\.yml$}) { |m| File.dirname(m[0]) }
watch('Gemfile')
watch('Guardfile')
watch('Rakefile')
watch(/.+\.gemspec$/)
watch(/.+\.rb$/)
end
end