We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 51b64f1 commit 8bf9abaCopy full SHA for 8bf9aba
spec/spec_helper.rb
@@ -19,6 +19,9 @@ module PuppetSpec
19
require 'monkey_patches/alias_should_to_must'
20
require 'mocha/api'
21
22
+# hack to enable all the expect syntax (like allow_any_instance_of) in rspec-puppet examples
23
+RSpec::Mocks::Syntax.enable_expect(RSpec::Puppet::ManifestMatchers)
24
+
25
RSpec.configure do |config|
26
config.before :each do
27
# Ensure that we don't accidentally cache facts and environment between
@@ -29,5 +32,12 @@ module PuppetSpec
29
32
Facter.clear_messages
30
33
31
34
Puppet[:parser] = 'future' if ENV['FUTURE_PARSER'] == 'yes'
35
36
+ RSpec::Mocks.setup
37
+ end
38
39
+ config.after :each do
40
+ RSpec::Mocks.verify
41
+ RSpec::Mocks.teardown
42
end
43
0 commit comments