Skip to content

Commit e405317

Browse files
committed
Add test_to_yaml
1 parent adfd698 commit e405317

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

test/stdlib/psych_test.rb

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,21 @@ def test_dump
7575
Psych, :dump, [1], indentation: 3, line_width: 30, canonical: true, header: true
7676
)
7777
end
78+
79+
def test_to_yaml
80+
assert_send_type(
81+
"() -> ::String",
82+
[1], :to_yaml
83+
)
84+
85+
assert_send_type(
86+
"(::StringIO) -> ::StringIO",
87+
[1], :to_yaml, StringIO.new()
88+
)
89+
90+
assert_send_type(
91+
"(indentation: ::Integer, line_width: ::Integer, canonical: bool, header: bool) -> ::String",
92+
[1], :to_yaml, indentation: 3, line_width: 30, canonical: true, header: true
93+
)
94+
end
7895
end

0 commit comments

Comments
 (0)