ruby-changes:60183
From: Nobuyoshi <ko1@a...>
Date: Tue, 25 Feb 2020 17:51:04 +0900 (JST)
Subject: [ruby-changes:60183] a504535dd4 (master): Prefer dedicated assertion method
https://git.ruby-lang.org/ruby.git/commit/?id=a504535dd4 From a504535dd4044bc8b2daf73076e01028da5ad58a Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Tue, 25 Feb 2020 17:47:17 +0900 Subject: Prefer dedicated assertion method diff --git a/test/ostruct/test_ostruct.rb b/test/ostruct/test_ostruct.rb index 61a4822..afe6aff 100644 --- a/test/ostruct/test_ostruct.rb +++ b/test/ostruct/test_ostruct.rb @@ -179,7 +179,7 @@ class TC_OpenStruct < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ostruct/test_ostruct.rb#L179 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) -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/