Skip to content

Commit

Permalink
Reconfigure Guard using simpler filespec expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
njonsson committed Apr 9, 2013
1 parent 1cd855a commit 95b7f5f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Guardfile
Expand Up @@ -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.
Expand All @@ -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.
Expand Down

0 comments on commit 95b7f5f

Please sign in to comment.