From 636e1d86d6dfff6787a9ef06370f212a75cf3cff Mon Sep 17 00:00:00 2001 From: Steven Pritchard Date: Tue, 18 Jun 2024 16:12:43 -0500 Subject: [PATCH] Switch from mocha to rspec mocks (#109) --- spec/spec_helper.rb | 2 +- spec/unit/puppet/provider/htaccess/htaccess_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index ca29415..613666b 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -94,7 +94,7 @@ def set_hieradata(hieradata) } c.mock_framework = :rspec - c.mock_with :mocha + c.mock_with :rspec c.module_path = File.join(fixture_path, 'modules') c.manifest_dir = File.join(fixture_path, 'manifests') if c.respond_to?(:manifest_dir) diff --git a/spec/unit/puppet/provider/htaccess/htaccess_spec.rb b/spec/unit/puppet/provider/htaccess/htaccess_spec.rb index f35891d..798efc5 100644 --- a/spec/unit/puppet/provider/htaccess/htaccess_spec.rb +++ b/spec/unit/puppet/provider/htaccess/htaccess_spec.rb @@ -4,7 +4,7 @@ provider_class = Puppet::Type.type(:htaccess).provider(:htaccess) describe provider_class do before :each do - FileUtils.stubs(:chown).returns(true) # can't chown root:root + allow(FileUtils).to receive(:chown).and_return(true) # can't chown root:root tmp = Tempfile.new('htaccess_tmp') @htaccess_file = tmp.path tmp.close!