Include this module in your test class if you wish to use the eq and any argument matching methods without a prefix. (Otherwise use FlexMock.any and FlexMock.eq(obj).
Methods
Public Instance methods
Return an argument matcher that matches any argument.
[ show source ]
# File lib/flexmock/argument_types.rb, line 23
23: def any
24: ANY
25: end
Return an argument matcher that matches any object that implementes (i.e. responds to) the given method list.
[ show source ]
# File lib/flexmock/argument_types.rb, line 48
48: def ducktype(*methods)
49: DuckMatcher.new(methods)
50: end
Return an argument matcher that only matches things equal to (==) the given object.
[ show source ]
# File lib/flexmock/argument_types.rb, line 29
29: def eq(obj)
30: EqualMatcher.new(obj)
31: end
Return an argument matcher that matches a hash with the given entries.
[ show source ]
# File lib/flexmock/argument_types.rb, line 42
42: def hsh(hash)
43: HashMatcher.new(hash)
44: end
Return an argument matcher that matches any object, that when passed to the supplied block, will cause the block to return true.
[ show source ]
# File lib/flexmock/argument_types.rb, line 36
36: def on(&block)
37: ProcMatcher.new(&block)
38: end