RAA - test-unit-mock

test-unit-mock / 0.03

Short description: Mock objects for Test::Unit test cases
Category: Library/Development
Status: release
Created: 2003-03-05 00:31:41 GMT
Last update: 2004-06-09 06:22:39 GMT
Owner: Michael Granger (Projects of this owner)
Homepage: http://www.deveiate.org/code/Test-Unit-Mock.shtml
Download: http://www.deveiate.org/code/Test-Unit-Mock-0.03.tar.gz
License: Ruby's
Dependency:
Requires: diff/0.4
Description:

Test::Unit::Mock is a class for conveniently building mock objects in Test::Unit test cases. It is based on ideas in Ruby/Mock by Nat Pryce <nat.pryce@b13media.com>, which is a class for doing much the same thing for RUnit test cases.

It allows you do make a mocked object that will respond to all the methods of the real class (albeit probably not with correct results) with one line of code. Eg.,

mockSocket = Test::Unit::MockObject( TCPSocket ).new

It allows you to set various kinds of return values for any method, check method call order either strictly, non-strictly, or not at all, and can generate a table of method calls with timestamps along with the stracktrace of where each one was called from.

Edit this project (for project owner)

back to RAA top