Permalink
Browse files

guard config for ccng

To use:

bundle install
bundle exec guard

All tests will run.  After that, if you edit/save a spec or source under lib,
the relevant spec will get re-run.

Change-Id: Iac98f291f4539d40516ee15867cefbffbd286d83
  • Loading branch information...
1 parent da4a9b8 commit d3ddf3257b6a74781a3d696ec9960e6db773b846 @pbozeman pbozeman committed Oct 18, 2012
Showing with 21 additions and 0 deletions.
  1. +1 −0 Gemfile
  2. +7 −0 Gemfile.lock
  3. +13 −0 Guardfile
View
1 Gemfile
@@ -34,4 +34,5 @@ group :test do
gem "sqlite3"
gem "machinist", "~> 1.0.6"
gem "webmock"
+ gem "guard-rspec"
end
View
7 Gemfile.lock
@@ -77,6 +77,11 @@ GEM
rack-accept
rack-mount
virtus
+ guard (1.4.0)
+ listen (>= 0.4.2)
+ thor (>= 0.14.6)
+ guard-rspec (1.2.1)
+ guard (>= 1.1)
hashie (1.2.0)
http_parser.rb (0.5.3)
httpclient (2.2.5)
@@ -85,6 +90,7 @@ GEM
json_pure (1.7.4)
launchy (2.1.1)
addressable (~> 2.3)
+ listen (0.5.3)
machinist (1.0.6)
membrane (0.0.2)
mime-types (1.19)
@@ -164,6 +170,7 @@ DEPENDENCIES
cf-uaa-client (~> 0.2.0)!
ci_reporter
eventmachine (~> 1.0.0)
+ guard-rspec
httpclient
machinist (~> 1.0.6)
membrane (~> 0.0.2)
View
13 Guardfile
@@ -0,0 +1,13 @@
+# ccng Guardfile
+# More info at https://github.com/guard/guard#readme
+
+guard 'rspec', :version => 2, :cli => '--color --format doc --fail-fast', :all_on_start => false, :all_after_pass => false do
+ watch(%r{^spec/.+_spec\.rb$})
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
+ watch(%r{^lib/cloud_controller/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
+ watch('spec/spec_helper.rb') { "spec" }
+
+ # These don't match the exact same dir structure between lib and spec
+ watch(%r{^lib/cloud_controller/legacy_api/(.+)\.rb$}) { |m| "spec/api/#{m[1]}_spec.rb" }
+ watch(%r{^lib/eventmachine/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
+end

0 comments on commit d3ddf32

Please sign in to comment.