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

Extract assert assertion to assert_include and assert_not_include.

This commit is contained in:
Hiroshi SHIBATA 2020-09-25 20:28:31 +09:00
parent 8705dba194
commit 6eeacbbc36
No known key found for this signature in database
GPG key ID: F9CF13417264FAC2

View file

@ -152,7 +152,8 @@ class JSONCommonInterfaceTest < Test::Unit::TestCase
temp_file_containing(@json) do |filespec|
parsed_object = JSON.public_send(method_name, filespec, symbolize_names: true)
key_classes = parsed_object.keys.map(&:class)
assert key_classes.include?(Symbol) && (! key_classes.include?(String))
assert_include(key_classes, Symbol)
assert_not_include(key_classes, String)
end
end