Michael Schuerig wrote:
> For unit tests I've written a mock object that should check its
> arguments against expected arguments using assertions from
> Test::Unit::Assertions. For instance methods I can include
> Test::Unit::Assertions in the mock class, that's easy. But how can I
> use these assertions in a class method?

Include them in the mock class's singleton class.

--- (untested code, but should work) ---
class MockClass
  include Test::Unit::Assertions

  class << self # To get the singleton class
    include Test::Unit::Assertions
  end

  # Whatever methods need to use the assertions
end
---