Sha256: 67f5ff16a1e2bf94094249971b4f05c555ac068eb8a360e87225f18a0017c0a9
Contents?: true
Size: 481 Bytes
Versions: 1
Compression:
Stored size: 481 Bytes
Contents
require 'matchi' module Expect # This module provides matchers to define expectations. module Matcher # Evaluate the expectation with the passed block. # # @param [Array, Hash, Symbol] definition # # @return [Boolean] report if the expectation is true or false def self.pass?(definition, &actual) params = Array(definition).flatten(1) matcher = Matchi.fetch(params.first, *params[1..-1]) matcher.matches?(&actual) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
expect-0.0.9 | lib/expect/matcher.rb |