-
-
Notifications
You must be signed in to change notification settings - Fork 210
Expand file tree
/
Copy pathGuardfile
More file actions
15 lines (13 loc) · 612 Bytes
/
Guardfile
File metadata and controls
15 lines (13 loc) · 612 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true
guard :rspec,
cmd: 'bundle exec rspec --format documentation',
failed_mode: :keep do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/libs/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { "spec" }
# Rails example
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch(%r{^app/(.*)(\.erb|\.haml|\.slim)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
watch('config/routes.rb') { "spec/routing" }
end