summaryrefslogtreecommitdiffstats
path: root/autotest/puppet_rspec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'autotest/puppet_rspec.rb')
-rw-r--r--autotest/puppet_rspec.rb84
1 files changed, 42 insertions, 42 deletions
diff --git a/autotest/puppet_rspec.rb b/autotest/puppet_rspec.rb
index 1504d453d..eda9cb534 100644
--- a/autotest/puppet_rspec.rb
+++ b/autotest/puppet_rspec.rb
@@ -2,50 +2,50 @@ require 'autotest'
require 'autotest/rspec'
Autotest.add_hook :initialize do |at|
- at.clear_mappings
-
- # the libraries under lib/puppet
- at.add_mapping(%r{^lib/puppet/(.*)\.rb$}) { |filename, m|
- at.files_matching %r!spec/(unit|integration)/#{m[1]}.rb!
- }
-
- # the actual spec files themselves
- at.add_mapping(%r{^spec/(unit|integration)/.*\.rb$}) { |filename, _|
- filename
- }
-
- # force a complete re-run for all of these:
-
- # main puppet lib
- at.add_mapping(%r{^lib/puppet\.rb$}) { |filename, _|
- at.files_matching %r{spec/(unit|integration)/.*\.rb}
- }
-
- # the spec_helper
- at.add_mapping(%r{^spec/spec_helper\.rb$}) { |filename, _|
- at.files_matching %r{spec/(unit|integration)/.*\.rb}
- }
-
- # the puppet test libraries
- at.add_mapping(%r{^test/lib/puppettest/.*}) { |filename, _|
- at.files_matching %r{spec/(unit|integration)/.*\.rb}
- }
-
- # the puppet spec libraries
- at.add_mapping(%r{^spec/lib/spec.*}) { |filename, _|
- at.files_matching %r{spec/(unit|integration)/.*\.rb}
- }
-
- # the monkey patches for rspec
- at.add_mapping(%r{^spec/lib/monkey_patches/.*}) { |filename, _|
- at.files_matching %r{spec/(unit|integration)/.*\.rb}
- }
+ at.clear_mappings
+
+ # the libraries under lib/puppet
+ at.add_mapping(%r{^lib/puppet/(.*)\.rb$}) { |filename, m|
+ at.files_matching %r!spec/(unit|integration)/#{m[1]}.rb!
+ }
+
+ # the actual spec files themselves
+ at.add_mapping(%r{^spec/(unit|integration)/.*\.rb$}) { |filename, _|
+ filename
+ }
+
+ # force a complete re-run for all of these:
+
+ # main puppet lib
+ at.add_mapping(%r{^lib/puppet\.rb$}) { |filename, _|
+ at.files_matching %r{spec/(unit|integration)/.*\.rb}
+ }
+
+ # the spec_helper
+ at.add_mapping(%r{^spec/spec_helper\.rb$}) { |filename, _|
+ at.files_matching %r{spec/(unit|integration)/.*\.rb}
+ }
+
+ # the puppet test libraries
+ at.add_mapping(%r{^test/lib/puppettest/.*}) { |filename, _|
+ at.files_matching %r{spec/(unit|integration)/.*\.rb}
+ }
+
+ # the puppet spec libraries
+ at.add_mapping(%r{^spec/lib/spec.*}) { |filename, _|
+ at.files_matching %r{spec/(unit|integration)/.*\.rb}
+ }
+
+ # the monkey patches for rspec
+ at.add_mapping(%r{^spec/lib/monkey_patches/.*}) { |filename, _|
+ at.files_matching %r{spec/(unit|integration)/.*\.rb}
+ }
end
# a place for overrides when necessary.
class Autotest::PuppetRspec < Autotest::Rspec
- def spec_commands
- ENV["AUTOTEST"] = "true"
- ENV["PATH"].split(File::PATH_SEPARATOR).collect { |dir| File.join(dir, "spec") }
- end
+ def spec_commands
+ ENV["AUTOTEST"] = "true"
+ ENV["PATH"].split(File::PATH_SEPARATOR).collect { |dir| File.join(dir, "spec") }
+ end
end