From 8843e245bab25ed71d993949604253afe929b611 Mon Sep 17 00:00:00 2001 From: Gabriel Nagy Date: Thu, 11 Mar 2021 16:50:58 +0200 Subject: (maint) Switch to rspec-mocks --- spec/lib/puppet_spec/compiler.rb | 2 +- spec/lib/puppet_spec/files.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'spec/lib/puppet_spec') diff --git a/spec/lib/puppet_spec/compiler.rb b/spec/lib/puppet_spec/compiler.rb index 4170b31..fc7e136 100644 --- a/spec/lib/puppet_spec/compiler.rb +++ b/spec/lib/puppet_spec/compiler.rb @@ -48,7 +48,7 @@ module PuppetSpec::Compiler def apply_with_error_check(manifest) apply_compiled_manifest(manifest) do |res| - res.expects(:err).never + expect(res).to receive(:err).never end end diff --git a/spec/lib/puppet_spec/files.rb b/spec/lib/puppet_spec/files.rb index a6529f6..201baf5 100644 --- a/spec/lib/puppet_spec/files.rb +++ b/spec/lib/puppet_spec/files.rb @@ -11,7 +11,7 @@ module PuppetSpec::Files until @global_tempfiles.empty? path = @global_tempfiles.pop 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 -- cgit v1.2.3