class RSpec::Matchers::BuiltIn::Have
def matches?(collection_or_owner)
def matches?(collection_or_owner) collection = determine_collection(collection_or_owner) case collection when enumerator_class for query_method in QUERY_METHODS next unless collection.respond_to?(query_method) @actual = collection.__send__(query_method) if @actual print_deprecation_message(query_method) break end end raise not_a_collection if @actual.nil? else query_method = determine_query_method(collection) raise not_a_collection unless query_method @actual = collection.__send__(query_method) print_deprecation_message(query_method) end case @relativity when :at_least then @actual >= @expected when :at_most then @actual <= @expected else @actual == @expected end end