Sha256: 6c68c59464f641cde4972b4727f0250c868740b3f77c41153e8ae2bee9cc6cd0
Contents?: true
Size: 513 Bytes
Versions: 10
Compression:
Stored size: 513 Bytes
Contents
module Riot # Asserts that the result of the test is an object that responds to the given method # asserts("test") { "foo" }.respond_to(:to_s) # should("test") { "foo" }.respond_to(:to_s) class RespondToMacro < AssertionMacro register :respond_to register :responds_to def evaluate(actual, expected) if actual.respond_to?(expected) pass(new_message.responds_to(expected)) else fail(expected_message.method(expected).is_not_defined) end end end end
Version data entries
10 entries across 10 versions & 1 rubygems