-
Notifications
You must be signed in to change notification settings - Fork 17
/
Guardfile
27 lines (22 loc) · 636 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
def watch_all
# watch /lib/rspreadsheet/ files
watch(%r{^lib/rspreadsheet/(.+).rb$}) do |m|
"spec/#{m[1]}_spec.rb"
end
# watch /spec/ files
watch(%r{^spec/(.+).rb$}) do |m|
"spec/#{m[1]}.rb"
end
end
# classical part
scope group: :normal
group :normal, cmd: "bundle exec rspec" do
guard 'rspec', cmd: 'bundle exec rspec' do watch_all end
end
# see https://stackoverflow.com/questions/18501471/guard-how-to-run-specific-tags-from-w-in-guards-console
group :focus do
guard 'rspec', cmd: 'bundle exec rspec --tag focus' do watch_all end
end
#group :f do
# guard 'rspec', cli: '--tag focus' do watch_all end
#end