diff options
author | Nick Lewis <nick@puppetlabs.com> | 2011-07-21 11:40:00 -0700 |
---|---|---|
committer | Jacob Helwig <jacob@puppetlabs.com> | 2011-08-19 13:52:56 -0700 |
commit | 546e0f98e3c6bfcb35163d1c6c19e0b4cb02e230 (patch) | |
tree | 983d9a9a29322d412864eb43bfca0ca345d11dd3 /spec/unit/util | |
parent | b6b54981bb0972ed6e57d5763e976418fe5bd32b (diff) | |
download | puppet-546e0f98e3c6bfcb35163d1c6c19e0b4cb02e230.tar.gz puppet-546e0f98e3c6bfcb35163d1c6c19e0b4cb02e230.tar.xz puppet-546e0f98e3c6bfcb35163d1c6c19e0b4cb02e230.zip |
Remove Puppet::Util::Cacher usage from Puppet::Util::Settings
The path attribute was being unnecessarily cached. The value is a LoadedFile
instance, which already knows how to check whether it needs to be reloaded. The
act of reparsing was being triggered separately from the cacher mechanism.
The comment indicated this value was only being cached so it could be easily
cleared for tests, but it wasn't being cleared for tests. Thus, there is no
reason for this attribute to be cached, so remove it.
Reviewed-By: Jacob Helwig <jacob@puppetlabs.com>
(cherry picked from commit bdcb9be3b5d7cd54548cbeb7b13bee6fe4e730f7)
Diffstat (limited to 'spec/unit/util')
-rwxr-xr-x | spec/unit/util/settings_spec.rb | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/spec/unit/util/settings_spec.rb b/spec/unit/util/settings_spec.rb index f7cb19936..76f229c0f 100755 --- a/spec/unit/util/settings_spec.rb +++ b/spec/unit/util/settings_spec.rb @@ -606,16 +606,6 @@ describe Puppet::Util::Settings do @settings.reparse end - it "should use a cached LoadedFile instance" do - first = mock 'first' - second = mock 'second' - Puppet::Util::LoadedFile.expects(:new).times(2).with("/test/file").returns(first).then.returns(second) - - @settings.file.should equal(first) - Puppet::Util::Cacher.expire - @settings.file.should equal(second) - end - it "should replace in-memory values with on-file values" do # Init the value text = "[main]\none = disk-init\n" |