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:
parent
0febd07c69
commit
a504535dd4
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue