fuel-library/deployment/puppet/lvm/.autotest
Stanislaw Bogatkin 29be2f2e4d Sync puppet module lvm to v0.3.1 from upstream
v0.3.1 sha1: 71486f47598a397ee5c8e68b3cddc10dce86d0c4
Implements: blueprint merge-openstack-puppet-modules

Change-Id: Ic050594a2aae82076a321c6298cc5e7f541d4884
2014-06-24 14:58:55 +04:00

54 lines
1.4 KiB
Plaintext

Autotest.add_hook :initialize do |at|
at.clear_mappings
# watch out: Ruby bug (1.8.6):
# %r(/) != /\//
at.add_mapping(%r%^spec/.*\.rb$%) { |filename, _|
filename
}
at.add_mapping(%r%^lib/(.*)\.rb$%) { |_, m|
["spec/#{m[1]}_spec.rb"]
}
at.add_mapping(%r%^spec/(spec_helper|shared/.*)\.rb$%) {
at.files_matching %r{^spec/.*_spec\.rb$}
}
# the libraries under lib/puppet
at.add_mapping(%r%^lib/(.*)\.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