Sha256: 957621a9ed1f338eb70952ac40a32a7b213913637d2b951cb9e757d8f138039a

Contents?: true

Size: 968 Bytes

Versions: 1

Compression:

Stored size: 968 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.5.0 Guardfile