Sha256: c2dd0e7d15d8aa4f4cd6630554b4505f1ad4a866f79eef60ef2a61dc26737ccc
Contents?: true
Size: 662 Bytes
Versions: 10
Compression:
Stored size: 662 Bytes
Contents
module Riot # Asserts that the result of the test is equivalent to the expected value. Using the +===+ operator. # # asserts("test") { "foo" }.equivalent_to(String) # should("test") { "foo" }.equivalent_to("foo") # asserts("test") { "foo" }.equivalent_to { "foo" } # # Underneath the hood, this assertion macro says: # # expected === actual class EquivalentToMacro < AssertionMacro register :equivalent_to def evaluate(actual, expected) if expected === actual pass new_message.is_equivalent_to(expected) else fail expected_message(actual).to_be_equivalent_to(expected) end end end end
Version data entries
10 entries across 10 versions & 1 rubygems