summaryrefslogtreecommitdiffstats
path: root/spec/unit/parser/resource.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/parser/resource.rb')
-rwxr-xr-xspec/unit/parser/resource.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/unit/parser/resource.rb b/spec/unit/parser/resource.rb
index 3f08de958..d41d4f48b 100755
--- a/spec/unit/parser/resource.rb
+++ b/spec/unit/parser/resource.rb
@@ -101,6 +101,17 @@ describe Puppet::Parser::Resource do
end
end
+ describe "when refering to a resource with name canonicalization" do
+ before do
+ @arguments = {:type => "file", :title => "/path/", :scope => stub('scope', :source => mock('source'))}
+ end
+
+ it "should canonicalize its own name" do
+ res = Puppet::Parser::Resource.new(@arguments)
+ res.ref.should == "File[/path]"
+ end
+ end
+
describe "when evaluating" do
before do
@type = Puppet::Parser::Resource