guard mixins properly
This commit is contained in:
parent
2036cbc223
commit
07d36b2b10
22
Guardfile
22
Guardfile
@ -7,23 +7,25 @@ guard_opts = {
|
||||
all_after_pass: true,
|
||||
}
|
||||
|
||||
def all_specs
|
||||
'spec'
|
||||
end
|
||||
def all_specs; 'spec' end
|
||||
def library_specs; 'spec/libraries' end
|
||||
def provider_specs; 'spec/providers' end
|
||||
|
||||
group :rspec do
|
||||
guard 'rspec', guard_opts do
|
||||
watch(%r{^Gemfile$}) { all_specs }
|
||||
watch(%r{^Gemfile.lock$}) { all_specs }
|
||||
watch(%r{^spec/spec_helper\.rb$}) { all_specs }
|
||||
watch(%r{^spec/helpers/(.+)\.rb$}) { all_specs }
|
||||
watch(%r{^spec/fixtures/(.+)\.rb$}) { all_specs }
|
||||
watch(%r{^libraries/pacemaker\.rb$}) { all_specs }
|
||||
watch(%r{^Gemfile$}) { all_specs }
|
||||
watch(%r{^Gemfile.lock$}) { all_specs }
|
||||
watch(%r{^spec/spec_helper\.rb$}) { all_specs }
|
||||
watch(%r{^spec/helpers/(.+)\.rb$}) { all_specs }
|
||||
watch(%r{^spec/fixtures/(.+)\.rb$}) { all_specs }
|
||||
watch(%r{^libraries/pacemaker\.rb$}) { all_specs }
|
||||
watch(%r{^libraries/(.*mixin.*)\.rb$}) { library_specs }
|
||||
watch(%r{^spec/.+_spec\.rb$})
|
||||
watch(%r{^libraries/(.+)\.rb$}) { |m|
|
||||
"spec/libraries/#{m[1]}_spec.rb"
|
||||
}
|
||||
watch(%r{^providers/common\.rb$}) { all_specs }
|
||||
watch(%r{^providers/common\.rb$}) { provider_specs }
|
||||
watch(%r{^providers/(.*mixin.*)\.rb$}) { provider_specs }
|
||||
watch(%r{^(resources|providers)/(.+)\.rb$}) { |m|
|
||||
"spec/providers/#{m[1]}_spec.rb"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user