Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
22 lines (19 sloc) 426 Bytes
module RSpec
module Matchers
module BuiltIn
class Cover < BaseMatcher
def initialize(*expected)
@expected = expected
end
def matches?(range)
@actual = range
@expected.all? { |e| range.cover?(e) }
end
def does_not_match?(range)
@actual = range
expected.none? { |e| range.cover?(e) }
end
end
end
end
end
Jump to Line
Something went wrong with that request. Please try again.