Skip to content

Commit

Permalink
Add test for YAML output of Module
Browse files Browse the repository at this point in the history
  • Loading branch information
herwinw committed Nov 15, 2023
1 parent 8cc3a88 commit 647d2e2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions library/yaml/to_yaml_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
YAMLSpecs::Example.to_yaml.should match_yaml("--- !ruby/class 'YAMLSpecs::Example'\n")
end

it "returns the YAML representation of a Module object" do
Enumerable.to_yaml.should match_yaml("--- !ruby/module 'Enumerable'\n")
end

it "returns the YAML representation of a Date object" do
require 'date'
Date.new(1997, 12, 30).to_yaml.should match_yaml("--- 1997-12-30\n")
Expand Down

0 comments on commit 647d2e2

Please sign in to comment.