lib/matchers/between_matcher.riml in speckle-0.1.26 vs lib/matchers/between_matcher.riml in speckle-0.1.27
- old
+ new
@@ -1,19 +1,16 @@
class BetweenMatcher
defm match(bounds, actual)
- min = bounds[0]
- max = bounds[1]
+ [min, max] = bounds
return actual >= min && actual <= max
end
defm failure_message_for_match(bounds, actual)
- min = bounds[0]
- max = bounds[1]
+ [min, max] = bounds
return "expected “#{actual}” to be between “#{min} .. #{max}”"
end
defm failure_message_for_mismatch(bounds, actual)
- min = bounds[0]
- max = bounds[1]
+ [min, max] = bounds
return "expected “#{actual}” to not be between “#{min} .. #{max}”"
end
end