# File lib/matchy/built_in/operator_expectations.rb, line 13 def initialize(receiver, match) @receiver, @match = receiver, match end
# File lib/matchy/built_in/operator_expectations.rb, line 29 def fail!(operator) flunk @match ? failure_message(operator) : negative_failure_message(operator) end
# File lib/matchy/built_in/operator_expectations.rb, line 33 def failure_message(operator) "Expected #{@receiver.inspect} to #{operator} #{@expected.inspect}." end
# File lib/matchy/built_in/operator_expectations.rb, line 37 def negative_failure_message(operator) "Expected #{@receiver.inspect} to not #{operator} #{@expected.inspect}." end
# File lib/matchy/built_in/operator_expectations.rb, line 25 def pass! defined?($current_test_case) ? $current_test_case.assert(true) : (assert true) end