aboutsummaryrefslogtreecommitdiff
path: root/spec/lib
diff options
context:
space:
mode:
authorGabriel Nagy <gabriel.nagy@puppet.com>2021-03-11 16:50:58 +0200
committerGabriel Nagy <gabriel.nagy@puppet.com>2021-03-11 16:53:26 +0200
commit8843e245bab25ed71d993949604253afe929b611 (patch)
tree3caa87736d1f4c8b0d10e053d7f36e6eafb4b13c /spec/lib
parent1487c207cca7217a909cf1a305431c45c93be64d (diff)
downloadpuppet-sshkeys_core-8843e245bab25ed71d993949604253afe929b611.tar.gz
puppet-sshkeys_core-8843e245bab25ed71d993949604253afe929b611.tar.bz2
(maint) Switch to rspec-mocks
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/puppet_spec/compiler.rb2
-rw-r--r--spec/lib/puppet_spec/files.rb2
2 files changed, 2 insertions, 2 deletions
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