Skip to content

Instantly share code, notes, and snippets.

@gouf
Created March 10, 2014 22:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gouf/9475473 to your computer and use it in GitHub Desktop.
Save gouf/9475473 to your computer and use it in GitHub Desktop.
# Ignore Vim swap files
ignore /~$/
ignore /^(?:.*[\\\/])?\.[^\\\/]+\.sw[p-z]$/
group :unit do
guard 'minitest', test_folders: 'test/unit', test_file_patterns: '*_test.rb' do
watch(%r'^lib/blah/(.+)\.rb$') {|m| "test/unit/#{m[1]}_test.rb"}
watch(%r'^test/unit/.+_test\.rb$')
end
end
group :spec do
guard 'rspec', binstubs: true, spec_paths: ['test/spec'], all_on_start: false, all_after_pass: false do
watch(%r'^lib/blah/(.+)\.rb$') {|m| "test/spec/#{m[1]}_spec.rb"}
watch(%r'^test/spec/.+_spec\.rb$')
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment