Sha256: 57a25604eb27470c86656cc76acbaf0a2b83ccafa9c2aebf77e3592e0fa59deb

Contents?: true

Size: 1.1 KB

Versions: 5

Compression:

Stored size: 1.1 KB

Contents

# Eaco's Guardfile
#
unless ENV['BUNDLE_GEMFILE'] =~ %r{gemfiles/rails}
  abort 'specs and features require appraisal. Try `appraisal rails-4.2 guard`'
end

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

# Clear the screen before every task
clearing :on

guard :rspec, version: 3, cmd: 'bundle exec 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$}) { system 'cucumber -f progress' }
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
eaco-1.1.2 Guardfile
eaco-1.0.0 Guardfile
eaco-0.8.2 Guardfile
eaco-0.8.1 Guardfile
eaco-0.8.0 Guardfile