summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xspec/unit/parser/scope.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/unit/parser/scope.rb b/spec/unit/parser/scope.rb
index 665b2ed63..0859eadb4 100755
--- a/spec/unit/parser/scope.rb
+++ b/spec/unit/parser/scope.rb
@@ -279,4 +279,18 @@ describe Puppet::Parser::Scope do
@scope.ephemeral_from(@match)
end
end
+
+ describe "when unsetting variables" do
+ it "should be able to unset normal variables" do
+ @scope.setvar("foo", "bar")
+ @scope.unsetvar("foo")
+ @scope.lookupvar("foo").should == ""
+ end
+
+ it "should be able to unset ephemeral variables" do
+ @scope.setvar("foo", "bar", :ephemeral => true)
+ @scope.unsetvar("foo")
+ @scope.lookupvar("foo").should == ""
+ end
+ end
end