diff options
author | Gabriel Nagy <gabriel.nagy@puppet.com> | 2021-03-11 14:17:09 +0200 |
---|---|---|
committer | Gabriel Nagy <gabriel.nagy@puppet.com> | 2021-03-11 14:37:19 +0200 |
commit | 51ebf2d8d5c02c7cd314edd9e6507163a8073785 (patch) | |
tree | 5d48c36b51fcf8116d4a4160a764f09e4abeb92c /spec/unit/type | |
parent | 7c3c42cecb1b864d026404c551374b1d95ee7d95 (diff) | |
download | puppet-cron_core-51ebf2d8d5c02c7cd314edd9e6507163a8073785.tar.gz puppet-cron_core-51ebf2d8d5c02c7cd314edd9e6507163a8073785.tar.bz2 |
(maint) Switch to rspec-mocks
Diffstat (limited to 'spec/unit/type')
-rw-r--r-- | spec/unit/type/cron_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/unit/type/cron_spec.rb b/spec/unit/type/cron_spec.rb index 1ce66a4..78deabf 100644 --- a/spec/unit/type/cron_spec.rb +++ b/spec/unit/type/cron_spec.rb @@ -3,12 +3,12 @@ require 'spec_helper' describe Puppet::Type.type(:cron), unless: Puppet.features.microsoft_windows? do let(:simple_provider) do provider_class = described_class.provide(:simple) { mk_resource_methods } - provider_class.stubs(:suitable?).returns true + allow(provider_class).to receive(:suitable?).and_return true provider_class end before :each do - described_class.stubs(:defaultprovider).returns simple_provider + allow(described_class).to receive(:defaultprovider).and_return simple_provider end after :each do @@ -574,7 +574,7 @@ describe Puppet::Type.type(:cron), unless: Puppet.features.microsoft_windows? do end it 'defaults to user => root if Etc.getpwuid(Process.uid) returns nil (#12357)' do - Etc.expects(:getpwuid).returns(nil) + expect(Etc).to receive(:getpwuid).and_return(nil) entry = described_class.new(name: 'test_entry', ensure: :present) expect(entry.value(:user)).to eql 'root' end |