Permalink
Browse files

autotest => Guard

  • Loading branch information...
1 parent bdd8191 commit 647073d4fb24989e2cb7ec279884cf630bc6cddd @nickh committed Feb 15, 2013
Showing with 72 additions and 2 deletions.
  1. +1 −0 .gitignore
  2. +4 −0 Gemfile
  3. +42 −0 Gemfile.lock
  4. +24 −0 Guardfile
  5. +0 −1 autotest/discover.rb
  6. 0 { → lib}/stringcalc.rb
  7. +1 −1 spec/spec_helper.rb
View
@@ -0,0 +1 @@
+tmp/
View
@@ -0,0 +1,4 @@
+gem 'guard'
+gem 'guard-rspec'
+gem 'rb-fsevent'
+gem 'terminal-notifier-guard'
View
@@ -0,0 +1,42 @@
+GEM
+ specs:
+ coderay (1.0.8)
+ diff-lcs (1.1.3)
+ guard (1.6.2)
+ listen (>= 0.6.0)
+ lumberjack (>= 1.0.2)
+ pry (>= 0.9.10)
+ terminal-table (>= 1.4.3)
+ thor (>= 0.14.6)
+ guard-rspec (2.4.0)
+ guard (>= 1.1)
+ rspec (~> 2.11)
+ listen (0.7.2)
+ lumberjack (1.0.2)
+ method_source (0.8.1)
+ pry (0.9.11.4)
+ coderay (~> 1.0.5)
+ method_source (~> 0.8)
+ slop (~> 3.4)
+ rb-fsevent (0.9.3)
+ rspec (2.12.0)
+ rspec-core (~> 2.12.0)
+ rspec-expectations (~> 2.12.0)
+ rspec-mocks (~> 2.12.0)
+ rspec-core (2.12.2)
+ rspec-expectations (2.12.1)
+ diff-lcs (~> 1.1.3)
+ rspec-mocks (2.12.2)
+ slop (3.4.3)
+ terminal-notifier-guard (1.5.3)
+ terminal-table (1.4.5)
+ thor (0.17.0)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ guard
+ guard-rspec
+ rb-fsevent
+ terminal-notifier-guard
View
@@ -0,0 +1,24 @@
+# A sample Guardfile
+# More info at https://github.com/guard/guard#readme
+
+guard 'rspec' do
+ watch(%r{^spec/.+_spec\.rb$})
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
+ watch('spec/spec_helper.rb') { "spec" }
+
+ # Rails example
+ watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
+ watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
+ watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
+ watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
+ watch('config/routes.rb') { "spec/routing" }
+ watch('app/controllers/application_controller.rb') { "spec/controllers" }
+
+ # Capybara features specs
+ watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/features/#{m[1]}_spec.rb" }
+
+ # Turnip features and steps
+ watch(%r{^spec/acceptance/(.+)\.feature$})
+ watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' }
+end
+
View
@@ -1 +0,0 @@
-Autotest.add_discovery { "rspec2" }
File renamed without changes.
View
@@ -1,2 +1,2 @@
-$:.unshift('.')
+$:.unshift File.expand_path(File.dirname(__FILE__), '../lib')
require 'stringcalc'

0 comments on commit 647073d

Please sign in to comment.