summaryrefslogtreecommitdiffstats
path: root/spec/unit/parser
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/parser')
-rwxr-xr-xspec/unit/parser/ast/collexpr.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/unit/parser/ast/collexpr.rb b/spec/unit/parser/ast/collexpr.rb
index 51cd820a2..e45203492 100755
--- a/spec/unit/parser/ast/collexpr.rb
+++ b/spec/unit/parser/ast/collexpr.rb
@@ -74,16 +74,18 @@ describe Puppet::Parser::AST::CollExpr do
end
end
- it "should check for array member equality if resource parameter is an array for ==" do
+ [:exported,:virtual].each do |mode|
+ it "should check for array member equality if resource parameter is an array for == in mode #{mode}" do
array = mock 'array', :safeevaluate => "array"
test1 = mock 'test1'
test1.expects(:safeevaluate).with(@scope).returns("test1")
resource = mock 'resource'
resource.expects(:[]).with("array").at_least(1).returns(["test1","test2","test3"])
- collexpr = ast::CollExpr.new(:test1 => array, :test2 => test1, :oper => "==")
+ collexpr = ast::CollExpr.new(:test1 => array, :test2 => test1, :oper => "==", :form => mode)
collexpr.evaluate(@scope)[1].call(resource).should be_true
end
+ end
it "should raise an error for invalid operator" do
lambda { collexpr = ast::CollExpr.new(:oper=>">") }.should raise_error