Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 25 lines (21 sloc) 0.424 kb
2d06b7f @durran Updating watchr script
durran authored
1 # vim:set filetype=ruby:
bd36063 @durran Adding watchr instead of rspactor
durran authored
2 def run(cmd)
3 puts cmd
4 system cmd
5 end
6
7 def spec(file)
2d06b7f @durran Updating watchr script
durran authored
8 if File.exists?(file)
c108c06 @cgriego Make it easier to fix CI issues by only failing specs fast with watchr
cgriego authored
9 run("rspec --fail-fast #{file}")
2d06b7f @durran Updating watchr script
durran authored
10 else
11 puts("Spec: #{file} does not exist.")
12 end
bd36063 @durran Adding watchr instead of rspactor
durran authored
13 end
14
4ac474b @durran Updating watchr script with come comments
durran authored
15 watch("spec/.*/*_spec\.rb") do |match|
2d06b7f @durran Updating watchr script
durran authored
16 puts(match[0])
4ac474b @durran Updating watchr script with come comments
durran authored
17 spec(match[0])
18 end
19
c581ee1 @durran Adding Criteria/Context#distinct
durran authored
20 watch("lib/(.*/.*)\.rb") do |match|
2d06b7f @durran Updating watchr script
durran authored
21 puts(match[1])
4ac474b @durran Updating watchr script with come comments
durran authored
22 spec("spec/unit/#{match[1]}_spec.rb")
b6c5647 @durran Updating watchr to look at spec/functional
durran authored
23 spec("spec/functional/#{match[1]}_spec.rb")
4ac474b @durran Updating watchr script with come comments
durran authored
24 end
Something went wrong with that request. Please try again.