Skip to content

Commit

Permalink
rspec: Remove Puppet::Util::Storage mock
Browse files Browse the repository at this point in the history
In attempting to upgrade bodgit/puppet-postfix's[^1] dependency on this
module, I received the following error:

  Failure/Error: allow(Puppet::Util::Storage).to receive(:store)
    The use of doubles or partial doubles from rspec-mocks outside
    of the per-test lifecycle is not supported.

This appears to be the result of the change in
637108e to use a mock rather than a
stub. However, it is not clear to me why Puppet::Util::Storage needs to
be mocked, as all tests still pass in this module and puppet-postfix
without it, so remove.

[1]: https://github.com/bodgit/puppet-postfix
  • Loading branch information
lollipopman committed Dec 15, 2022
1 parent 7446dc3 commit aa427ad
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions spec/lib/augeas_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,4 @@ class AugeasSpec::Error < StandardError
config.extend AugeasSpec::Fixtures
config.include AugeasSpec::Augparse
config.include AugeasSpec::Fixtures

config.before do
allow(Puppet::Util::Storage).to receive(:store)
end
end

0 comments on commit aa427ad

Please sign in to comment.