summaryrefslogtreecommitdiffstats
path: root/spec/unit/resource_reference.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/resource_reference.rb')
-rwxr-xr-xspec/unit/resource_reference.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/unit/resource_reference.rb b/spec/unit/resource_reference.rb
index e629d0b82..ee71a5077 100755
--- a/spec/unit/resource_reference.rb
+++ b/spec/unit/resource_reference.rb
@@ -40,6 +40,12 @@ describe Puppet::ResourceReference do
ref.type.should == "Foo::Bar"
ref.title.should == "yay"
end
+
+ it "should interpret the title as a reference and assign appropriately if the type is nil and the title contains nested square brackets" do
+ ref = Puppet::ResourceReference.new(nil, "foo::bar[baz[yay]]")
+ ref.type.should == "Foo::Bar"
+ ref.title.should =="baz[yay]"
+ end
end
describe Puppet::ResourceReference, "when resolving resources with a catalog" do