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