summaryrefslogtreecommitdiffstats
path: root/spec/unit/parser/ast/resource_reference.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/parser/ast/resource_reference.rb')
-rwxr-xr-xspec/unit/parser/ast/resource_reference.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/unit/parser/ast/resource_reference.rb b/spec/unit/parser/ast/resource_reference.rb
index 3a759c550..24865e846 100755
--- a/spec/unit/parser/ast/resource_reference.rb
+++ b/spec/unit/parser/ast/resource_reference.rb
@@ -60,4 +60,10 @@ describe Puppet::Parser::AST::ResourceReference do
ref.evaluate(@scope)
end
+ it "should return a correct representation when converting to string" do
+ type = stub 'type', :is_a? => true, :to_s => "file"
+ title = stub 'title', :is_a? => true, :to_s => "[/tmp/a, /tmp/b]"
+
+ ast::ResourceReference.new( :type => type, :title => title ).to_s.should == "File[/tmp/a, /tmp/b]"
+ end
end