class RSpec::Matchers::BuiltIn::Cover

Public Class Methods

new(*expected) click to toggle source
# File lib/rspec/matchers/built_in/cover.rb, line 5
def initialize(*expected)
  @expected = expected
end

Public Instance Methods

does_not_match?(range) click to toggle source
# File lib/rspec/matchers/built_in/cover.rb, line 14
def does_not_match?(range)
  @actual = range
  expected.none? { |e| range.cover?(e) }
end
matches?(range) click to toggle source
# File lib/rspec/matchers/built_in/cover.rb, line 9
def matches?(range)
  @actual = range
  @expected.all? { |e| range.cover?(e) }
end