class RSpec::Matchers::BuiltIn::BeComparedTo
def description
def description "be #{@operator} #{expected_to_sentence}#{args_to_sentence}" end
def failure_message_for_should
def failure_message_for_should "expected: #{@operator} #{@expected.inspect}\n got: #{@operator.to_s.gsub(/./, ' ')} #{@actual.inspect}" end
def failure_message_for_should_not
def failure_message_for_should_not message = <<-MESSAGE ive_expectation_expression}` not only FAILED, bit confusing. MESSAGE raise message << ([:===,:==].include?(@operator) ? "It might be more clearly expressed without the \"be\"?" : "It might be more clearly expressed in the positive?") end
def initialize(operand, operator)
def initialize(operand, operator) @expected, @operator = operand, operator @args = [] end
def matches?(actual)
def matches?(actual) @actual = actual @actual.__send__ @operator, @expected end
def negative_expectation_expression
def negative_expectation_expression Expectations::Syntax.negative_expression("actual", "be #{@operator} #{@expected}") end