diff options
Diffstat (limited to 'spec')
| -rwxr-xr-x | spec/unit/resource.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/unit/resource.rb b/spec/unit/resource.rb index 0eacd0b90..3840db535 100755 --- a/spec/unit/resource.rb +++ b/spec/unit/resource.rb @@ -664,6 +664,13 @@ describe Puppet::Resource do result["foo"].should == %w{bar eh} result["fee"].should == %w{baz} end + + it "should serialize relationships as reference strings" do + resource = Puppet::Resource.new("File", "/foo") + resource[:requires] = Puppet::Resource.new("File", "/bar") + result = Puppet::Resource.from_pson(PSON.parse(resource.to_pson)) + result[:requires].should == "File[/bar]" + end end describe "when converting from pson" do |
