summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Cooper <josh@puppetlabs.com>2011-05-20 10:46:46 -0700
committerJosh Cooper <josh@puppetlabs.com>2011-05-20 10:46:46 -0700
commit181098ba045ee6731540a9d9d9517cd3a5c272e8 (patch)
tree291ec7ea184cbd0aad4ab01a5b657775ff5ea5ba
parent9c3bedd6b4d53584967e42a7fd07441252b56f6e (diff)
downloadpuppet-181098ba045ee6731540a9d9d9517cd3a5c272e8.tar.gz
puppet-181098ba045ee6731540a9d9d9517cd3a5c272e8.tar.xz
puppet-181098ba045ee6731540a9d9d9517cd3a5c272e8.zip
(#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 <matt@puppetlabs.com>
-rwxr-xr-xspec/integration/parser/parser_spec.rb4
1 files 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