Permalink
Browse files

Reconfigure Guard using simpler filespec expressions

  • Loading branch information...
1 parent 1cd855a commit 95b7f5f0f6dc4a25794d49ae4d2df0ab5a129221 @njonsson committed Apr 9, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 Guardfile
View
@@ -3,7 +3,7 @@ interactor :off
guard :rspec, :cli => '--debug' do
# Run the corresponding spec (or all specs) when code changes.
watch(%r{^lib/(.+)\.rb$}) do |match|
- Dir[File.join("**/#{match[1]}_spec.rb")].first || 'spec'
+ Dir["spec/#{match[1]}_spec.rb"].first || 'spec'
end
# Run a spec when it changes.
@@ -25,7 +25,7 @@ guard :cucumber do
# changes.
watch(%r{^features/step_definitions\.rb$}) { 'features' }
watch(%r{^features/step_definitions/(.+)_steps\.rb$}) do |match|
- Dir[File.join("**/#{match[1]}.feature")].first || 'features'
+ Dir["features/**/#{match[1]}.feature"].first || 'features'
end
# Run a feature when it changes.

0 comments on commit 95b7f5f

Please sign in to comment.