From: Daniel Berger Date: 2010-03-04T05:25:27+09:00 Subject: Re: Test::Unit::Omission - Unable to omit tests On Mar 3, 12:20 pm, Champak Ch wrote: > I am trying to omit some tests while using the test unit framework. My > code and result below. > > Code: > require 'rubygems' > gem 'test-unit' > require 'test/unit' > > def testing >   puts "hi1" >   omit >   puts "hi2" > end Two things. First, your tests must be defined within a subclass of Test::Unit::TestCase: class MyTests < Test::Unit::TestCase def test_omit puts "hi1" omit puts "hi2" end end Second, your tests should all start with "test_". Test-unit will ignore all other methods, except for setup, teardown, self.startup and self.shutdown. Regards, Dan