File: Guardfile

package info (click to toggle)
ruby-descendants-tracker 0.0.4-2.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 212 kB
  • sloc: ruby: 86; makefile: 2
file content (18 lines) | stat: -rw-r--r-- 633 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# encoding: utf-8

guard :bundler do
  watch('Gemfile')
end

guard :rspec do
  # run all specs if the spec_helper or supporting files files are modified
  watch('spec/spec_helper.rb')                      { 'spec' }
  watch(%r{\Aspec/(?:lib|support|shared)/.+\.rb\z}) { 'spec' }

  # run unit specs if associated lib code is modified
  watch(%r{\Alib/(.+)\.rb\z})                                         { |m| Dir["spec/unit/#{m[1]}"] }
  watch("lib/#{File.basename(File.expand_path('../', __FILE__))}.rb") { 'spec'                       }

  # run a spec if it is modified
  watch(%r{\Aspec/(?:unit|integration)/.+_spec\.rb\z})
end