Commit 4c99a33

mo k <mo@mokhan.ca>
2012-11-04 19:58:39
add guard
1 parent 22137d5
Gemfile
@@ -5,3 +5,8 @@ gem 'rspec'
 gem 'rspec-fakes'
 gem 'cucumber'
 gem 'simplecov'
+gem 'guard-rspec'
+
+gem 'rb-inotify', :require => false
+gem 'rb-fsevent', :require => false
+gem 'rb-fchange', :require => false
Gemfile.lock
@@ -2,6 +2,7 @@ GEM
   remote: https://rubygems.org/
   specs:
     builder (3.1.4)
+    coderay (1.0.8)
     cucumber (1.2.1)
       builder (>= 2.1.2)
       diff-lcs (>= 1.1.3)
@@ -11,11 +12,32 @@ GEM
     developwithpassion_fakes (0.1.1)
       developwithpassion_arrays
     diff-lcs (1.1.3)
+    ffi (1.1.5)
     gherkin (2.11.5)
       json (>= 1.4.6)
+    guard (1.5.3)
+      listen (>= 0.4.2)
+      lumberjack (>= 1.0.2)
+      pry (>= 0.9.10)
+      thor (>= 0.14.6)
+    guard-rspec (2.1.1)
+      guard (>= 1.1)
+      rspec (~> 2.11)
     json (1.7.5)
+    listen (0.5.3)
+    lumberjack (1.0.2)
+    method_source (0.8.1)
     multi_json (1.3.6)
+    pry (0.9.10)
+      coderay (~> 1.0.5)
+      method_source (~> 0.8)
+      slop (~> 3.3.1)
     rake (0.9.2.2)
+    rb-fchange (0.0.6)
+      ffi
+    rb-fsevent (0.9.2)
+    rb-inotify (0.8.8)
+      ffi (>= 0.5.0)
     rspec (2.11.0)
       rspec-core (~> 2.11.0)
       rspec-expectations (~> 2.11.0)
@@ -31,13 +53,19 @@ GEM
       multi_json (~> 1.0)
       simplecov-html (~> 0.7.1)
     simplecov-html (0.7.1)
+    slop (3.3.3)
+    thor (0.16.0)
 
 PLATFORMS
   ruby
 
 DEPENDENCIES
   cucumber
+  guard-rspec
   rake
+  rb-fchange
+  rb-fsevent
+  rb-inotify
   rspec
   rspec-fakes
   simplecov
Guardfile
@@ -0,0 +1,20 @@
+# A sample Guardfile
+# More info at https://github.com/guard/guard#readme
+#
+
+guard 'rspec', :cli => '--color --format nested' do
+  watch(%r{^lib/(.+)\.rb$}) do |item|
+    "spec/unit/#{item[1]}_spec.rb"
+  end
+  watch(%r{^spec/.+_spec\.rb$})
+  watch('spec/spec_helper.rb') do |item|
+    "spec"
+  end
+end
+
+notification :tmux,
+  :display_message => true,
+  :timeout => 5,
+  :default_message_format => '%s >> %s',
+  :line_separator => ' > ',
+  :color_location => 'status-left-bg'