From 181098ba045ee6731540a9d9d9517cd3a5c272e8 Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Fri, 20 May 2011 10:46:46 -0700 Subject: (#7502) Fixed parser spec for ruby 1.8.5 The first method is not available on Enumerable in ruby 1.8.5, so when it is mixed into ASTArray, you can't call first. Reviewed-By: Matt Robinson --- spec/integration/parser/parser_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/integration/parser/parser_spec.rb b/spec/integration/parser/parser_spec.rb index b55aa04ce..f68aff670 100755 --- a/spec/integration/parser/parser_spec.rb +++ b/spec/integration/parser/parser_spec.rb @@ -126,14 +126,14 @@ describe Puppet::Parser::Parser do it "should be able to pass an array to a function" do "my_function([1,2,3])".should parse_with { |fun| fun.is_a?(Puppet::Parser::AST::Function) && - fun.arguments.first.evaluate(stub 'scope') == ['1','2','3'] + fun.arguments[0].evaluate(stub 'scope') == ['1','2','3'] } end it "should be able to pass a hash to a function" do "my_function({foo => bar})".should parse_with { |fun| fun.is_a?(Puppet::Parser::AST::Function) && - fun.arguments.first.evaluate(stub 'scope') == {'foo' => 'bar'} + fun.arguments[0].evaluate(stub 'scope') == {'foo' => 'bar'} } end end -- cgit