Sha256: 0c54cbdd9e16934d1c033b2a85426db4a6080193675d49fa98c916f5339ef24d
Contents?: true
Size: 415 Bytes
Versions: 7
Compression:
Stored size: 415 Bytes
Contents
require 'set' require 'test/unit' class Mock def initialize(class_to_mock=nil) @class_to_mock = class_to_mock @expectations = Set.new end def expects(message) @expectations.add(message) end def verify end def method_missing(method, *args) if (not @expectations.include? method) raise "Unexpected extra call to #{method}" end end end
Version data entries
7 entries across 7 versions & 1 rubygems