Sha256: 775b1bf004b82b961e98f195820b98e14d3cb6c408046297b1c36c1e111e9881
Contents?: true
Size: 438 Bytes
Versions: 19
Compression:
Stored size: 438 Bytes
Contents
RSpec::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
19 entries across 19 versions & 1 rubygems