summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rwxr-xr-xspec/unit/resource/type.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/unit/resource/type.rb b/spec/unit/resource/type.rb
index 27c53936d..cd1881f8c 100755
--- a/spec/unit/resource/type.rb
+++ b/spec/unit/resource/type.rb
@@ -290,6 +290,14 @@ describe Puppet::Resource::Type do
@scope.lookupvar("foo").should == "something"
end
+ it "should set all default values as parameters in the resource" do
+ @type.set_arguments :foo => stub("value", :safeevaluate => "something")
+
+ @type.set_resource_parameters(@resource, @scope)
+
+ @resource[:foo].should == "something"
+ end
+
it "should fail if the resource does not provide a value for a required argument" do
@type.set_arguments :foo => nil
@resource.expects(:to_hash).returns({})