Skip to content

Commit

Permalink
Update Guardfile template to use real regexes.
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuel committed May 4, 2011
1 parent 304a843 commit f317650
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/guard/minitest/templates/Guardfile
@@ -1,11 +1,11 @@
guard 'minitest' do
# with Minitest::Unit
watch('^test/test_(.*).rb')
watch('^lib/(.*)([^/]+)\.rb') { |m| "test/#{m[1]}test_#{m[2]}.rb" }
watch('^test/test_helper.rb') { "test" }
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('^spec/(.*)_spec.rb')
# watch('^lib/(.*)\.rb') { |m| "spec/#{m[1]}_spec.rb" }
# watch('^spec/spec_helper.rb') { "spec" }
# watch(%r|^spec/(.*)_spec.rb|)
# watch(%r|^lib/(.*)\.rb|) { |m| "spec/#{m[1]}_spec.rb" }
# watch(%r|^spec/spec_helper.rb|) { "spec" }
end

0 comments on commit f317650

Please sign in to comment.