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

testing

Error:
test_omit.rb:9:in `testing': undefined local variable or method `omit'
for main:Object (NameError)
                from test_omit.rb:13
hi1
===========================================
I included the following lines in the code above

require 'test/unit/omission'
include Test::Unit::OmissionHandler

But I still get the error as below: -
c:/ruby/lib/ruby/gems/1.8/gems/test-unit-2.0.6/lib/test/unit/omission.rb:144:in
`included': undefined method `exception_handler' for Object:Class
(NoMethodError)
                from test_omit.rb:5:in `include'
                from test_omit.rb:5

Any suggestions to get this working?

-Champak
-- 
Posted via http://www.ruby-forum.com/.