Sha256: 6c520dc4ca0a0d3d059eb3914f675604f0e11010a91155abd5273737461f2144
Contents?: true
Size: 475 Bytes
Versions: 1
Compression:
Stored size: 475 Bytes
Contents
module WildcardMatchers module Helpers def for_any(expectation = nil, &block) expectation = block_given? ? block : expectation ForAny.new(expectation) end class ForAny < ::WildcardMatchers::WildcardMatcher protected def wildcard_match(actual) unless actual.any? {|e| self.class.superclass.check_errors(e, expectation) == [] } errors.push("expect #{actual} has #{expectation}") end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
wildcard_matchers-0.1.1 | lib/wildcard_matchers/helpers/for_any.rb |