Guardfile in yamg-0.3.8 vs Guardfile in yamg-0.5.0

- old
+ new

@@ -5,22 +5,17 @@ # directories %w(app lib config test spec feature) ## Uncomment to clear the screen before every task # clearing :on -guard :minitest do - # with Minitest::Unit - # watch(%r{^test/(.*)\/?test_(.*)\.rb$}) - # watch(%r{^lib/(.*/)?([^/]+)\.rb$}) { |m| "test/#{m[1]}test_#{m[2]}.rb" } - # watch(%r{^test/test_helper\.rb$}) { 'test' } - - # with Minitest::Spec - watch(%r{^spec/(.*)_spec\.rb$}) - watch(%r{^lib/(.+)\.rb$}) { 'spec' } - # watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" } - watch(%r{^spec/spec_helper\.rb$}) { 'spec' } -end - guard :rubocop do watch(/.+\.rb$/) watch(%r{(?:.+/)?\.rubocop\.yml$}) { |m| File.dirname(m[0]) } +end + +guard :rspec, cmd: 'bundle exec rspec' do + watch(%r{^spec/.+_spec\.rb$}) + watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" } + watch(%r{^generators/(.+)\.rb$/}) { |_m| 'spec/schemaless/worker_spec' } + + watch('spec/spec_helper.rb') { 'spec' } end