mirror of
https://github.com/jimeh/bunnyrun.git
synced 2026-02-19 07:56:40 +00:00
Add guard
This commit is contained in:
18
Guardfile
Normal file
18
Guardfile
Normal file
@@ -0,0 +1,18 @@
|
||||
# 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
|
||||
Reference in New Issue
Block a user