From: Rob Biedenharn Date: 2010-01-23T05:29:25+09:00 Subject: Re: newbie help On Jan 22, 2010, at 1:46 PM, Se Ed wrote: > I am having a problem with using the test-unit gem > > I get a NoMethodError when I simply do > > require 'test/unit/assertions' > #I've also used just require 'test/unit' > > def test > assert_equal(true, true) > end > > test > > > Sorry for such a simple question You should be creating a subclass of Test::Unit::TestCase in your file and defining tests within that. # in a file named my_test.rb (just convention, call it fred.rb if you like) require 'test/unit' class MyTest < Test::Unit::TestCase def test_starting_simple assert_equal(true, true) end end __END__ Then run that file with "ruby ./my_test.rb" to get: $ ruby ./my_test.rb Loaded suite ./my_test Started . Finished in 0.000476 seconds. 1 tests, 1 assertions, 0 failures, 0 errors That should get you going. -Rob Rob Biedenharn http://agileconsultingllc.com Rob@AgileConsultingLLC.com