-
Notifications
You must be signed in to change notification settings - Fork 0
/
Guardfile
35 lines (28 loc) · 815 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
28
29
30
31
32
33
34
35
guard :livereload do
watch(%r{app/assets/builds/application.css$})
watch(%r{app/views/.+\.(erb|haml|slim)$})
watch(%r{app/helpers/.+\.(rb)$})
watch(%r{app/javascript/controllers/.+\.js$})
end
guard :rspec, cmd: "./bin/rspec --format documentation" do
require "guard/rspec/dsl"
dsl = Guard::RSpec::Dsl.new(self)
clearing :on
watch('app/models/concerns/notifiable.rb') do
[
'spec/models/comment_spec.rb',
'spec/models/change_spec.rb',
]
end
rspec = dsl.rspec
watch(rspec.spec_files)
rails = dsl.rails
dsl.watch_spec_files_for(rails.app_files)
watch(rails.controllers) do |m|
[
rspec.spec.call("requests/#{m[1]}_request"),
]
end
# watch(rails.spec_helper) { rspec.spec_dir }
watch(rails.app_controller) { "#{rspec.spec_dir}/controllers" }
end