-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGuardfile
27 lines (21 loc) · 935 Bytes
/
Guardfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
guard 'minitest', test_folders: 'spec', test_file_patterns: 'test_*.rb' do
# with Minitest::Unit
# watch(%r{^spec/lib/test_.*\.rb})
# watch(%r|^test/(.*)\/?test_(.*)\.rb|)
# watch(%r|^lib/(.*)([^/]+)\.rb|) { |m| "test/#{m[1]}test_#{m[2]}.rb" }
# watch(%r|^lib/otherbase/contacts?.rb|) { "test" }
# with Minitest::Spec
watch(%r|^spec/lib/test_(.*)\.rb|)
watch(%r{^lib/treet/(.+)\.rb$}) { |m| "spec/lib/test_#{m[1]}.rb" }
watch(%r|^spec/test_helper\.rb|) { "spec" }
# watch(%r|^lib/(.*)([^/]+)\.rb|) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
# watch(%r|^spec/spec_helper\.rb|) { "spec" }
end
guard 'rspec' do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/treet/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
watch(%r{^(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { "spec" }
end