-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGuardfile
More file actions
30 lines (24 loc) · 878 Bytes
/
Copy pathGuardfile
File metadata and controls
30 lines (24 loc) · 878 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
30
# 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{^arcade/(.+)\.rb$}) { |m| "spec/arcade/#{m[1]}_spec.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/arcade/(.+)_spec\.rb$})
end
#interactor :simple
#if RUBY_PLATFORM == 'java'
#guard( 'jruby-rspec') {fire} #', :spec_paths => ["spec"]
#else
guard( :rspec, cmd: "bundle exec rspec --format documentation ") { fire }
#end