Michael Schuerig said:
>
> But how can I use these assertions in a class method?

require 'test/unit'

class Foo
  # This:
  class << self
    include Test::Unit::Assertions
  end
  # OR this:
  extend Test::Unit::Assertions

  def self.do_something
    flunk('Badness')
  end
end

Foo::do_something
__END__

You will need to rescue on the Test::Unit::AssertionFailedError if you
don't want your first failed test taking the whole program down.

Ryan