1 # automatically load any shared examples or contexts
2 Dir["./spec/support/**/*.rb"].sort.each { |f| require f }
4 # hack to enable all the expect syntax (like allow_any_instance_of) in rspec-puppet examples
5 RSpec::Mocks::Syntax.enable_expect(RSpec::Puppet::ManifestMatchers)
7 RSpec.configure do |config|
8 # supply tests with a possibility to test for the future parser
9 config.add_setting :puppet_future
10 config.puppet_future = Puppet.version.to_f >= 4.0
12 config.before :each do
13 # Ensure that we don't accidentally cache facts and environment between
14 # test cases. This requires each example group to explicitly load the
15 # facts being exercised with something like
16 # Facter.collection.loader.load(:ipaddress)
29 # Helper class to test handling of arguments which are derived from string
30 class AlsoString < String