Sha256: 04d0328ed59893a164a0f33ccb08238cb1d96c2f7db8f34298bb065a32c31e9d
Contents?: true
Size: 327 Bytes
Versions: 2
Compression:
Stored size: 327 Bytes
Contents
module Riot # Asserts the result has items # asserts("an array") { [1] }.any # asserts("a hash") { {:name => 'washington'} }.any class AnyMacro < AssertionMacro register :any def evaluate(actual) actual.any? ? pass("is not empty") : fail("expected #{actual.inspect} to have items") end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
riot-0.10.11 | lib/riot/assertion_macros/any.rb |
riot-0.10.10 | lib/riot/assertion_macros/any.rb |