Sha256: 70da7771de44c241b1657853bda634ab5cd6d53e0d87a3ef8d56fbf213f3ebc6
Contents?: true
Size: 437 Bytes
Versions: 31
Compression:
Stored size: 437 Bytes
Contents
Spec::Matchers.define(:respond_to_boolean) do |method| match do |instance| instance.respond_to?(method) && is_boolean?(instance.send(method)) end description do "should respond to #{method} and return boolean" end failure_message_for_should do |instance| "expected #{instance.inspect} to respond to #{method} and return boolean" end def is_boolean?(value) value == true || value == false end end
Version data entries
31 entries across 31 versions & 1 rubygems