summaryrefslogtreecommitdiffstats
path: root/spec/unit
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-08-02 07:27:16 +0000
committerJames Turnbull <james@lovedthanlost.net>2009-08-02 17:32:15 +1000
commit97274ad976e3584ae850ad91cc886fae1dcdbbc6 (patch)
tree8d47ec0ffad1284dd7d9916b56323a98cabdc4a8 /spec/unit
parent6fb8bf625fcfa12b085101838813ab7bc4635dae (diff)
downloadpuppet-97274ad976e3584ae850ad91cc886fae1dcdbbc6.tar.gz
puppet-97274ad976e3584ae850ad91cc886fae1dcdbbc6.tar.xz
puppet-97274ad976e3584ae850ad91cc886fae1dcdbbc6.zip
Fixing problems my Feature refactor caused
The problems were that I wasn't propagating return values sufficiently, such that false values didn't travel enough, and the 'name' attribute was necessary in the private method but wasn't actually passed in. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'spec/unit')
-rwxr-xr-xspec/unit/util/feature.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/unit/util/feature.rb b/spec/unit/util/feature.rb
index cf7d06614..576e19bc8 100755
--- a/spec/unit/util/feature.rb
+++ b/spec/unit/util/feature.rb
@@ -60,10 +60,12 @@ describe Puppet::Util::Feature do
@features.should be_myfeature
end
- it "should consider a feature to be absent if any of its libraries are absent" do
+ it "should log and consider a feature to be absent if any of its libraries are absent" do
@features.add(:myfeature, :libs => %w{foo bar})
- @features.expects(:require).with("foo")
- @features.expects(:require).with("bar").raises(LoadError)
+ @features.expects(:require).with("foo").raises(LoadError)
+ @features.stubs(:require).with("bar")
+
+ Puppet.expects(:debug)
@features.should_not be_myfeature
end