From: Kouhei Sutou Date: 2010-03-06T12:13:53+09:00 Subject: Re: Test::Unit::Omission - Unable to omit tests Hi, In <9fe46c8b5818159d02e1d95a71ba5e25@ruby-forum.com> "Re: Test::Unit::Omission - Unable to omit tests" on Sat, 6 Mar 2010 11:58:25 +0900, Champak Ch wrote: > I simplified the code as much as possible below. omit is still not > recognised. Runs without any errors if omit() is removed. I am not sure > what I am really missing. > > require 'test/unit' > > class TC_MyTests < Test::Unit::TestCase > def test_01_login > puts "\nLogged in" > end > > def test_02_omit > puts "\nHello 1" > omit() > puts "\nHello 2" > end > > def test_03_logoff > puts "\nLogged off" > end > end Please try the following code: -- require 'rubygems' gem 'test-unit' require 'test/unit' class TC_MyTests < Test::Unit::TestCase def test_01_login puts "\nLogged in" end def test_02_omit puts "\nHello 1" omit() puts "\nHello 2" end def test_03_logoff puts "\nLogged off" end end -- Then run the file: % ruby tc_my_tests.rb Thanks, -- kou