''Ruby/Mock is a package that makes it easy to implement Mock Objects in RubyUnit test cases '' ---- It provides a generic Mock class that can be used to create mock objects for any interface. A test uses closures to define the expectations of a mock object. Tests can also encapsulate protocols into reusable mock-object classes. See MockingLegacyCode for a short example.