ddidier/ndd-url_checker

View on GitHub
Guardfile

Summary

Maintainability
Test Coverage
# ----------------------------------------------------------------------------------------------------------------------
# bundler
# ----------------------------------------------------------------------------------------------------------------------

guard 'bundler' do
  watch('Gemfile')
end


# ----------------------------------------------------------------------------------------------------------------------
# spork (must be before rspec and cucumber)
# ----------------------------------------------------------------------------------------------------------------------

guard 'spork',
      wait: 60 do

  watch('Gemfile')
  watch('Gemfile.lock')

  # ----- spec directory
  watch('spec/spec_helper.rb')
end


# ----------------------------------------------------------------------------------------------------------------------
# rspec
# ----------------------------------------------------------------------------------------------------------------------

guard :rspec, cmd: 'bundle exec rspec' do

  # ----- lib directory
  watch(%r{^lib/(.+)\.rb$}) { |m| %W(spec/#{m[1]}_spec.rb) }
  watch(%r{^lib/(.+)\.(.+)\.erb$}) { |m| %W(spec/#{m[1]}_spec.rb) }

  # ----- spec directory
  watch(%r{^spec/.+_spec\.rb$})
  watch(%r{^spec/support/(.+)\.rb$}) { %W(spec) }
end