Sha256: 966935330796f95b81b084e078ad5c19033cdce7023be0acb53f7626f3b5029f

Contents?: true

Size: 953 Bytes

Versions: 1

Compression:

Stored size: 953 Bytes

Contents

# Eaco's Guardfile

# Watch lib/ and spec/
directories %w(lib spec)

# Clear the screen before every task
clearing :on

guard :rspec, version: 3, cmd: 'rspec' do
  # When single specs change, run them.
  watch(%r{^spec/.+_spec\.rb$})

  # When spec_helper changes rerun all the specs.
  watch('spec/spec_helper.rb') { "spec" }

  # When a source changes run its unit spec.
  watch(%r{^lib/(.+)\.rb$}) {|m| "spec/#{m[1]}_spec.rb" }
end

guard :cucumber do
  # When single features change, run them.
  watch(%r{^features/.+\.feature$})

  # When support code changes, rerun all features.
  watch(%r{^features/support/.+$}) { 'features' }

  # When a step definition for a feature changes, rerun the corresponding feature.
  watch(%r{^features/step_definitions/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'features' }
end

#guard :shell do
#  # Rerun scenarios when source code changes
#  watch(%r{^lib/.+\.rb$}) { 'cucumber' }
#end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
eaco-0.6.0 Guardfile