class RSpec::Matchers::BuiltIn::Compound::And

@api public Matcher used to represent a compound `and` expectation.

Public Instance Methods

failure_message() click to toggle source

@api private @return [String]

# File lib/rspec/matchers/built_in/compound.rb, line 231
def failure_message
  if matcher_1_matches?
    matcher_2.failure_message
  elsif matcher_2_matches?
    matcher_1.failure_message
  else
    compound_failure_message
  end
end

Private Instance Methods

conjunction() click to toggle source
# File lib/rspec/matchers/built_in/compound.rb, line 248
def conjunction
  "and"
end
match(*) click to toggle source
Calls superclass method
# File lib/rspec/matchers/built_in/compound.rb, line 243
def match(*)
  super
  matcher_1_matches? && matcher_2_matches?
end