summaryrefslogtreecommitdiffstats
path: root/spec/unit/parameter.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/parameter.rb')
-rwxr-xr-xspec/unit/parameter.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/unit/parameter.rb b/spec/unit/parameter.rb
new file mode 100755
index 000000000..d6858c29d
--- /dev/null
+++ b/spec/unit/parameter.rb
@@ -0,0 +1,24 @@
+#!/usr/bin/env ruby
+
+require File.dirname(__FILE__) + '/../spec_helper'
+
+require 'puppet/parameter'
+
+describe Puppet::Parameter do
+ describe "when returning the value" do
+ before do
+ @class = Class.new(Puppet::Parameter)
+ @class.initvars
+ @parameter = @class.new :resource => mock('resource')
+ end
+
+ it "should return nil if no value is set" do
+ @parameter.value.should be_nil
+ end
+
+ it "should return any set value" do
+ @parameter.value = "foo"
+ @parameter.value.should == "foo"
+ end
+ end
+end