diff options
Diffstat (limited to 'spec/unit/resource_spec.rb')
-rwxr-xr-x | spec/unit/resource_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/unit/resource_spec.rb b/spec/unit/resource_spec.rb index aff3816c2..95f0dd04b 100755 --- a/spec/unit/resource_spec.rb +++ b/spec/unit/resource_spec.rb @@ -687,6 +687,13 @@ describe Puppet::Resource do result = Puppet::Resource.from_pson(PSON.parse(resource.to_pson)) result[:requires].should == "File[/bar]" end + + it "should serialize multiple relationships as arrays of reference strings" do + resource = Puppet::Resource.new("File", "/foo") + resource[:requires] = [Puppet::Resource.new("File", "/bar"), Puppet::Resource.new("File", "/baz")] + result = Puppet::Resource.from_pson(PSON.parse(resource.to_pson)) + result[:requires].should == [ "File[/bar]", "File[/baz]" ] + end end describe "when converting from pson" do |