Sha256: e7eb0f7b5b270f92ee436055cbb29587a10adc9320ab3e5533667c01b5e4f9f8
Contents?: true
Size: 640 Bytes
Versions: 15
Compression:
Stored size: 640 Bytes
Contents
module Mocktail::Matchers class Base # Custom matchers can receive any args, kwargs, or block they want. Usually # single-argument, though, so that's defaulted here and in #insepct def initialize(expected) @expected = expected end def self.matcher_name raise Mocktail::Error.new("The `matcher_name` class method must return a valid method name") end def match?(actual) raise Mocktail::Error.new("Matchers must implement `match?(argument)`") end def inspect "#{self.class.matcher_name}(#{@expected.inspect})" end def is_mocktail_matcher? true end end end
Version data entries
15 entries across 15 versions & 1 rubygems