From 98ef1e0e34c86bcc11e44a6902b74f52d648bb56 Mon Sep 17 00:00:00 2001 From: Gabriel Nagy Date: Thu, 11 Mar 2021 18:15:33 +0200 Subject: (maint) Switch to rspec-mocks --- spec/unit/provider/host/parsed_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'spec/unit/provider') diff --git a/spec/unit/provider/host/parsed_spec.rb b/spec/unit/provider/host/parsed_spec.rb index e07c83d..32e8b44 100644 --- a/spec/unit/provider/host/parsed_spec.rb +++ b/spec/unit/provider/host/parsed_spec.rb @@ -29,10 +29,10 @@ describe Puppet::Type.type(:host).provider(:parsed) do end def genhost(host) - provider.stubs(:filetype).returns(Puppet::Util::FileType::FileTypeRam) - File.stubs(:chown) - File.stubs(:chmod) - Puppet::Util::SUIDManager.stubs(:asuser).yields + allow(provider).to receive(:filetype).and_return(Puppet::Util::FileType::FileTypeRam) + allow(File).to receive(:chown) + allow(File).to receive(:chmod) + allow(Puppet::Util::SUIDManager).to receive(:asuser).and_yield host.flush provider.target_object(hostfile).read end -- cgit v1.2.3