forked from dmytro/nagira
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGuardfile
31 lines (25 loc) · 1.26 KB
/
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
28
29
30
31
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
guard 'rspec', cmd: "rspec -fp" do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^spec/(.*)/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { "spec" }
# Rails example
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch(%r{^lib/app.rb$}) { "spec" }
watch(%r{^lib/app/routes/put.rb$}) { |m| "spec/put" }
watch(%r{^lib/app/routes/(.+)/(.+)\.rb$}) { |m| "spec/#{m[1]}/#{m[2]}_spec.rb" }
#
# Endpoints
# --------------------------------------------
watch(%r{^lib/app/routes/(.+)/(.+)\.rb$}) { |m| "spec/#{m[1]}/endpoints_spec.rb" }
watch(%r{^lib/app/routes/(.+)\.rb$}) { |m| "spec/#{m[1]}/endpoints_spec.rb" }
watch(%r{^spec/(.+)/support\.rb$}) { |m| "spec/#{m[1]}" }
watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
#
# GET's
# --------------------------------------------
watch(%r{^lib/app/routes/(.+)/status\.rb$}) { |m| "spec/#{m[1]}/comments_spec.rb" }
watch(%r{^lib/app/routes/(.+)/status\.rb$}) { |m| "spec/#{m[1]}/comments_spec.rb" }
end