aboutsummaryrefslogtreecommitdiff
path: root/spec/lib/puppet_spec
diff options
context:
space:
mode:
authorGheorghe Popescu <gheorghe.popescu@puppet.com>2021-03-12 09:14:24 +0200
committerGitHub <noreply@github.com>2021-03-12 09:14:24 +0200
commitc63ef326bfd2cdd96bbfc3aa368358e301dd7b66 (patch)
tree89d5f38a26cb801ce69ce77a3a8c36cd2eb4541a /spec/lib/puppet_spec
parent7c3c42cecb1b864d026404c551374b1d95ee7d95 (diff)
parent9596250a8c0d4263c8ecc7b4c84e4df4ee57b968 (diff)
downloadpuppet-cron_core-c63ef326bfd2cdd96bbfc3aa368358e301dd7b66.tar.gz
puppet-cron_core-c63ef326bfd2cdd96bbfc3aa368358e301dd7b66.tar.bz2
Merge pull request #43 from GabrielNagy/MODULES-10953/update-metadata
Diffstat (limited to 'spec/lib/puppet_spec')
-rw-r--r--spec/lib/puppet_spec/compiler.rb4
-rw-r--r--spec/lib/puppet_spec/files.rb2
2 files changed, 3 insertions, 3 deletions
diff --git a/spec/lib/puppet_spec/compiler.rb b/spec/lib/puppet_spec/compiler.rb
index fb04a7b..44274bf 100644
--- a/spec/lib/puppet_spec/compiler.rb
+++ b/spec/lib/puppet_spec/compiler.rb
@@ -33,7 +33,7 @@ module PuppetSpec::Compiler
if Puppet.version.to_f < 5.0
args << 'apply'
# rubocop:disable RSpec/AnyInstance
- Puppet::Transaction::Persistence.any_instance.stubs(:save)
+ allow_any_instance_of(Puppet::Transaction::Persistence).to receive(:save)
# rubocop:enable RSpec/AnyInstance
end
catalog = compile_to_ral(manifest)
@@ -51,7 +51,7 @@ module PuppetSpec::Compiler
def apply_with_error_check(manifest)
apply_compiled_manifest(manifest) do |res|
- res.expects(:err).never
+ expect(res).not_to receive(:err)
end
end
diff --git a/spec/lib/puppet_spec/files.rb b/spec/lib/puppet_spec/files.rb
index c8315c9..af0e936 100644
--- a/spec/lib/puppet_spec/files.rb
+++ b/spec/lib/puppet_spec/files.rb
@@ -10,7 +10,7 @@ module PuppetSpec::Files
$global_tempfiles ||= []
$global_tempfiles.each do |path|
begin
- Dir.unstub(:entries)
+ allow(Dir).to receive(:entries).and_call_original
FileUtils.rm_rf path, secure: true
rescue Errno::ENOENT # rubocop:disable Lint/HandleExceptions
# nothing to do