Sha256: a6bcb3225601ca82cdcf92780ecdd6702c2f291d66758ed16f61fc5f840251d8

Contents?: true

Size: 443 Bytes

Versions: 6

Compression:

Stored size: 443 Bytes

Contents

class BetweenMatcher
  defm match(bounds, actual)
    [min, max] = bounds
    return actual >= min && actual <= max
  end

  defm failure_message_for_match(bounds, actual)
    [min, max] = bounds
    return "expected “#{actual}” to be between “#{min} .. #{max}”"
  end

  defm failure_message_for_mismatch(bounds, actual)
    [min, max] = bounds
    return "expected “#{actual}” to not be between “#{min} .. #{max}”"
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
speckle-0.2.0 lib/matchers/between_matcher.riml
speckle-0.1.31 lib/matchers/between_matcher.riml
speckle-0.1.30 lib/matchers/between_matcher.riml
speckle-0.1.29 lib/matchers/between_matcher.riml
speckle-0.1.28 lib/matchers/between_matcher.riml
speckle-0.1.27 lib/matchers/between_matcher.riml