You will have to require the file of the class you are testing. Also, I suspect that you aren't testing a class named "Unit". If you are testing a class named "Array", your class name would be "ArrayTest" Another point to make: I don't think you have to write an "initialize" method at any point. You can use setup() and teardown() (?), and use test_whatever for the actual tests. I.e. require 'test/unit' require 'array' class ArrayTest < Test::Unit::TestCase def setup @array = Array.new end def test_new_array_is_empty assert @array.empty? end end Scott On Apr 1, 2007, at 1:50 PM, aidy wrote: > Hi > > I am trying to run some unit tests. > > > <snip> > require 'test/unit' > > > class UnitTests < Test::Unit::TestCase > > def initialize > assert(true) > end > > end > > UnitTests.new > <snip> > > but i am receiving this error > > c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:117:in `add_assertion': > undefined method `add_assertion' for nil:NilClass (NoMethodError) > > could anyone help? > > aidy > >