-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathGuardfile
More file actions
29 lines (23 loc) · 781 Bytes
/
Guardfile
File metadata and controls
29 lines (23 loc) · 781 Bytes
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
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
def fire
require "ostruct"
# Generic Ruby apps
rspec = OpenStruct.new
rspec.spec = ->(m) { "spec/#{m}_spec.rb" }
rspec.spec_dir = "spec"
rspec.spec_helper = "spec/spec_helper.rb"
watch(%r{^spec/.+_spec\.rb$})
# watch(%r{^spec/usecase/(.+)\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
# watch(%r{^examples/time_graph/spec/(.+)_spec\.rb$})
watch('examples/time_graph/spec/create_time_spec.rb')
watch('spec/spec_helper.rb') { "spec" }
watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
end
interactor :simple
if RUBY_PLATFORM == 'java'
guard( 'jruby-rspec') {fire} #', :spec_paths => ["spec"]
else
guard( :rspec, cmd: "bundle exec rspec") { fire }
end