Sha256: dc9dc2415c6867bbb171c72e7c999edd8d64891f7a4bb5fd8cc38a152217ae7a
Contents?: true
Size: 303 Bytes
Versions: 2
Compression:
Stored size: 303 Bytes
Contents
module Riot # Asserts that the result of the test is nil # asserts("test") { nil }.nil # should("test") { nil }.nil class NilMacro < AssertionMacro register :nil def evaluate(actual) actual.nil? ? pass("is nil") : fail("expected nil, not #{actual.inspect}") end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
riot-0.10.11 | lib/riot/assertion_macros/nil.rb |
riot-0.10.10 | lib/riot/assertion_macros/nil.rb |