1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/optparse] Add tests for load(into:)

https://github.com/ruby/optparse/commit/51f7e060ee
This commit is contained in:
Nobuyoshi Nakada 2022-10-29 22:25:42 +09:00 committed by git
parent 37291df91d
commit d5fb76a6c8

View file

@ -27,6 +27,8 @@ class TestOptionParserLoad < Test::Unit::TestCase
def assert_load(result) def assert_load(result)
assert new_parser.load assert new_parser.load
assert_equal(result, @result) assert_equal(result, @result)
assert new_parser.load(into: into = {})
assert_equal({test: result}, into)
end end
def setup_options(env, dir, suffix = nil) def setup_options(env, dir, suffix = nil)