diff options
| author | Luke Kanies <luke@madstop.com> | 2008-11-11 13:01:14 -0800 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2008-11-11 13:01:14 -0800 |
| commit | 29b97943e7efaad3cb3f8e7b82004c067d3fbf82 (patch) | |
| tree | 1abb306a834786f2681249c762c57dcd21ebd7bd /spec/unit/util | |
| parent | cd09d6b90d3365d06e8e706aab3edbd8f568f1c9 (diff) | |
| download | puppet-29b97943e7efaad3cb3f8e7b82004c067d3fbf82.tar.gz puppet-29b97943e7efaad3cb3f8e7b82004c067d3fbf82.tar.xz puppet-29b97943e7efaad3cb3f8e7b82004c067d3fbf82.zip | |
Allowing a nil expirer for caching classes.
If there's no expirer, then the value is regenerated every
time.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'spec/unit/util')
| -rwxr-xr-x | spec/unit/util/cacher.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/unit/util/cacher.rb b/spec/unit/util/cacher.rb index 5bdaaaa65..26fe20f84 100755 --- a/spec/unit/util/cacher.rb +++ b/spec/unit/util/cacher.rb @@ -51,7 +51,7 @@ describe Puppet::Util::Cacher do CacheTest.new.expirer.should equal(Puppet::Util::Cacher) end - describe "when defining cached attributes" do + describe "when using cached attributes" do before do @expirer = ExpirerTest.new @object = CacheTest.new @@ -90,5 +90,10 @@ describe Puppet::Util::Cacher do @expirer.expire @object.instance_cache.should equal(@object.instance_cache) end + + it "should always consider a value expired if it has no expirer" do + @object.stubs(:expirer).returns nil + @object.instance_cache.should_not equal(@object.instance_cache) + end end end |
