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

Prefer dedicated assertion method

This commit is contained in:
Nobuyoshi Nakada 2020-02-25 17:47:17 +09:00
parent 0febd07c69
commit a504535dd4
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -179,7 +179,7 @@ class TC_OpenStruct < Test::Unit::TestCase
def test_accessor_defines_method
os = OpenStruct.new(foo: 42)
assert os.respond_to? :foo
assert_respond_to(os, :foo)
assert_equal([], os.singleton_methods)
assert_equal(42, os.foo)
assert_equal([:foo, :foo=], os.singleton_methods.sort)