Sha256: c272092754a48c40c423fd3169f22bb30bf78f7b97088b57b9994b0901a37de5
Contents?: true
Size: 479 Bytes
Versions: 10
Compression:
Stored size: 479 Bytes
Contents
module Riot # Asserts that the result of the test is an object that is a kind of the expected type # asserts("test") { "foo" }.kind_of(String) # should("test") { "foo" }.kind_of(String) class KindOfMacro < AssertionMacro register :kind_of def evaluate(actual, expected) if actual.kind_of?(expected) pass new_message.is_a_kind_of(expected) else fail expected_message.kind_of(expected).not(actual.class) end end end end
Version data entries
10 entries across 10 versions & 1 rubygems