summaryrefslogtreecommitdiffstats
path: root/spec/unit/parser/ast/vardef.rb
diff options
context:
space:
mode:
authorBrice Figureau <brice-puppet@daysofwonder.com>2009-07-26 14:03:14 +0200
committerJames Turnbull <james@lovedthanlost.net>2009-08-01 11:15:28 +1000
commitf357a9192647fc5d436d4c934b1912f59996389f (patch)
treec6d94f9a4b284f95eb5c1a7927cd25995924d970 /spec/unit/parser/ast/vardef.rb
parentd40ef291191e627a91d6ec73b438853e2d3a73e8 (diff)
downloadpuppet-f357a9192647fc5d436d4c934b1912f59996389f.tar.gz
puppet-f357a9192647fc5d436d4c934b1912f59996389f.tar.xz
puppet-f357a9192647fc5d436d4c934b1912f59996389f.zip
Implement ephemeral scope variables
Those variables have been created to be short lived and used mainly to define temporary special variables. They do not persist after a call to unset_ephemeral_var. Also Scope#set_ephemeral_from can be used to promote a regexp MatchData to ephemeral values. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
Diffstat (limited to 'spec/unit/parser/ast/vardef.rb')
-rwxr-xr-xspec/unit/parser/ast/vardef.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/unit/parser/ast/vardef.rb b/spec/unit/parser/ast/vardef.rb
index 14de68923..9730ceedb 100755
--- a/spec/unit/parser/ast/vardef.rb
+++ b/spec/unit/parser/ast/vardef.rb
@@ -25,7 +25,7 @@ describe Puppet::Parser::AST::VarDef do
name = stub 'name', :safeevaluate => "var"
value = stub 'value', :safeevaluate => "1"
- @scope.expects(:setvar).with { |name,value,file,line,append| append == nil }
+ @scope.expects(:setvar).with { |name,value,options| options[:append] == nil }
vardef = Puppet::Parser::AST::VarDef.new :name => name, :value => value, :file => nil,
:line => nil
@@ -36,7 +36,7 @@ describe Puppet::Parser::AST::VarDef do
name = stub 'name', :safeevaluate => "var"
value = stub 'value', :safeevaluate => "1"
- @scope.expects(:setvar).with { |name,value,file,line,append| append == true }
+ @scope.expects(:setvar).with { |name,value,options| options[:append] == true }
vardef = Puppet::Parser::AST::VarDef.new :name => name, :value => value, :file => nil,
:line => nil, :append => true