Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
例:
def setup end def teardown end
セットアップメソッドで現在のケース名を取得するにはどうすればよいですか?
Ruby 1.9.3 では、次のようなことができます。
def setup puts self.__name__ end
ruby 2.1.5 に同梱されている単体テストでは、次のようです。
def setup p method_name end