summaryrefslogtreecommitdiffstats
path: root/spec/unit/parser/ast/function.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/parser/ast/function.rb')
-rw-r--r--spec/unit/parser/ast/function.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/unit/parser/ast/function.rb b/spec/unit/parser/ast/function.rb
index 15420132f..bb687eac0 100644
--- a/spec/unit/parser/ast/function.rb
+++ b/spec/unit/parser/ast/function.rb
@@ -16,6 +16,12 @@ describe Puppet::Parser::AST::Function do
end
end
+ it "should return its representation with to_s" do
+ args = stub 'args', :is_a? => true, :to_s => "[a, b]"
+
+ Puppet::Parser::AST::Function.new(:name => "func", :arguments => args).to_s.should == "func(a, b)"
+ end
+
describe "when evaluating" do
it "should fail if the function doesn't exist" do