Sha256: 9d6818deb694055cdbc7aeb7f79acbdfd3a1d8901fdcae9be91832fef1d6c401
Contents?: true
Size: 920 Bytes
Versions: 11
Compression:
Stored size: 920 Bytes
Contents
# encoding: utf-8 guard :bundler do watch('Gemfile') end guard :rspec, :cli => File.read('.rspec').split.join(' '), :keep_failed => false do # run all specs if configuration is modified watch('Guardfile') { 'spec' } watch('Gemfile.lock') { 'spec' } watch('spec/spec_helper.rb') { 'spec' } # run all specs if supporting files files are modified 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(%r{\Alib/(.+)/support/(.+)\.rb\z}) { |m| Dir["spec/unit/#{m[1]}/#{m[2]}"] } 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
Version data entries
11 entries across 11 versions & 5 rubygems