Last change
on this file since 30903 was 30903, checked in by davidb, 7 years ago |
Vagrant provisioning files for a 4-node Hadoop cluster. See README.txt for more details
|
File size:
886 bytes
|
Line | |
---|
1 |
|
---|
2 | # hack to enable all the expect syntax (like allow_any_instance_of) in rspec-puppet examples
|
---|
3 | RSpec::Mocks::Syntax.enable_expect(RSpec::Puppet::ManifestMatchers)
|
---|
4 |
|
---|
5 | RSpec.configure do |config|
|
---|
6 | # supply tests with a possibility to test for the future parser
|
---|
7 | config.add_setting :puppet_future
|
---|
8 | config.puppet_future = Puppet.version.to_f >= 4.0
|
---|
9 |
|
---|
10 | config.before :each do
|
---|
11 | # Ensure that we don't accidentally cache facts and environment between
|
---|
12 | # test cases. This requires each example group to explicitly load the
|
---|
13 | # facts being exercised with something like
|
---|
14 | # Facter.collection.loader.load(:ipaddress)
|
---|
15 | Facter.clear
|
---|
16 | Facter.clear_messages
|
---|
17 |
|
---|
18 | RSpec::Mocks.setup
|
---|
19 | end
|
---|
20 |
|
---|
21 | config.after :each do
|
---|
22 | RSpec::Mocks.verify
|
---|
23 | RSpec::Mocks.teardown
|
---|
24 | end
|
---|
25 | end
|
---|
26 |
|
---|
27 | # Helper class to test handling of arguments which are derived from string
|
---|
28 | class AlsoString < String
|
---|
29 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.