diff options
Diffstat (limited to 'spec/unit/parser/ast/astarray.rb')
-rwxr-xr-x | spec/unit/parser/ast/astarray.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/unit/parser/ast/astarray.rb b/spec/unit/parser/ast/astarray.rb index 212c3fd14..1791c711c 100755 --- a/spec/unit/parser/ast/astarray.rb +++ b/spec/unit/parser/ast/astarray.rb @@ -62,5 +62,11 @@ describe Puppet::Parser::AST::ASTArray do operator.evaluate(@scope).should == [[123]] end + it "should return a valid string with to_s" do + a = stub 'a', :is_a? => true, :to_s => "a" + b = stub 'b', :is_a? => true, :to_s => "b" + array = Puppet::Parser::AST::ASTArray.new :children => [a,b] + array.to_s.should == "[a, b]" + end end |