diff options
author | Benoit Daloze <[email protected]> | 2020-10-24 15:52:37 +0200 |
---|---|---|
committer | Benoit Daloze <[email protected]> | 2020-10-24 15:53:53 +0200 |
commit | 148961adcd0704d964fce920330a6301b9704c25 (patch) | |
tree | 1f1f0cb7326775788683c77f0e2cceb495d3cc95 /spec/ruby/library/yaml | |
parent | 342fbae83c2e80d1b49656bc7c689cc7fe8980ce (diff) |
Update to ruby/spec@4f59d86
Diffstat (limited to 'spec/ruby/library/yaml')
-rw-r--r-- | spec/ruby/library/yaml/dump_spec.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/spec/ruby/library/yaml/dump_spec.rb b/spec/ruby/library/yaml/dump_spec.rb index 9e884b0fd7..3107a8f51d 100644 --- a/spec/ruby/library/yaml/dump_spec.rb +++ b/spec/ruby/library/yaml/dump_spec.rb @@ -37,9 +37,12 @@ describe "YAML.dump" do it "dumps an OpenStruct" do require "ostruct" os = OpenStruct.new("age" => 20, "name" => "John") - os2 = YAML.load(YAML.dump(os)) - os2.age.should == 20 - os2.name.should == "John" + yaml_dump = YAML.dump(os) + + [ + "--- !ruby/object:OpenStruct\nage: 20\nname: John\n", + "--- !ruby/object:OpenStruct\ntable:\n :age: 20\n :name: John\n", + ].should.include?(yaml_dump) end it "dumps a File without any state" do |