Sha256: d75ba92e8ab267e30b21c6eae4505fc506d6ada42337b960d3d65532582e7c87
Contents?: true
Size: 323 Bytes
Versions: 10
Compression:
Stored size: 323 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_message(actual).to_have_items) end end end
Version data entries
10 entries across 10 versions & 1 rubygems