2016-04-10から1日間の記事一覧
class Test def say_hoge hoge1 = Hoge.new hoge2 = Hoge.new hoge1.say hoge2.say end end class Hoge def say puts 'hoge' end end こんな感じのクラスがあったとして、 Test#say_hoge で Hoge インスタンスが Hoge#say を1回ずつ実行していることをテスト…
class Test def say_hoge hoge1 = Hoge.new hoge2 = Hoge.new hoge1.say hoge2.say end end class Hoge def say puts 'hoge' end end こんな感じのクラスがあったとして、 Test#say_hoge で Hoge インスタンスが Hoge#say を1回ずつ実行していることをテスト…