+(other)
click to toggle source
def +(other)
self.class.new(self.to_a + other.to_a)
end
add(expectation)
click to toggle source
def add(expectation)
@expectations.unshift(expectation)
expectation
end
any?()
click to toggle source
def any?
@expectations.any?
end
length()
click to toggle source
def length
@expectations.length
end
match(method_name, *arguments)
click to toggle source
def match(method_name, *arguments)
matching_expectations(method_name, *arguments).first
end
match_allowing_invocation(method_name, *arguments)
click to toggle source
def match_allowing_invocation(method_name, *arguments)
matching_expectations(method_name, *arguments).detect { |e| e.invocations_allowed? }
end
matches_method?(method_name)
click to toggle source
def matches_method?(method_name)
@expectations.any? { |expectation| expectation.matches_method?(method_name) }
end
remove_all_matching_method(method_name)
click to toggle source
def remove_all_matching_method(method_name)
@expectations.reject! { |expectation| expectation.matches_method?(method_name) }
end
to_a()
click to toggle source
def to_a
@expectations
end
to_set()
click to toggle source
def to_set
@expectations.to_set
end
verified?(assertion_counter = nil)
click to toggle source
def verified?(assertion_counter = nil)
@expectations.all? { |expectation| expectation.verified?(assertion_counter) }
end