From: Kouhei Sutou Date: 2011-07-30T19:05:23+09:00 Subject: Re: No tests were specified errror Hi, In <3b1a10acac5551a92db4fe01e8581f9e@ruby-forum.com> "Re: No tests were specified errror" on Fri, 29 Jul 2011 20:05:44 +0900, Robert Klemme wrote: > Brian Candler wrote in post #1013695: >> If someone can explain how to mark BaseClass as 'not for testing' then >> I'd like to know that as well, as I had the same problem too. > > +1 Implement it as a module not class. To share method implementations, a module and 'include' are used in Ruby way. To implement the same category objects, a class and inheritance are used in Ruby way. So test-unit 2.x use a module and 'include' for 'not for testing, just for sharing'. ("Ruby way" is one of the important keywords in test-unit API.) >> My workaround was to define a method test_dummy in BaseClass which does >> nothing (or just assert true), but I expect there's a better way. > > Another workaround might be to replace BaseClass with a module which is > included in DemoTest which then directly inherits Test::Unit::TestCase. So it's not workaround. It's a right (Ruby and test-unit) way. :-) Thanks, -- kou