class Test::Unit::TestRefute::TestFailure

Public Instance Methods

test_error_invalid_message_true() click to toggle source
# File test-unit-3.3.4/test/test-assertions.rb, line 1594
def test_error_invalid_message_true
  check_fail("assertion message must be String, Proc or " +
               "Test::Unit::Assertions::AssertionMessage: " +
        "<false>(<FalseClass>)") do
    begin
      refute(true, false)
    rescue ArgumentError
      raise AssertionFailedError, $!.message
    end
  end
end
test_fail_with_assertion_message() click to toggle source
# File test-unit-3.3.4/test/test-assertions.rb, line 1585
def test_fail_with_assertion_message
  check_fail("user message.\n" +
               "placeholder <:in> message") do
    refute(true, build_message("user message",
                               "placeholder <?> message",
                               :in))
  end
end
test_true() click to toggle source
# File test-unit-3.3.4/test/test-assertions.rb, line 1572
def test_true
  check_fail("<true> is neither nil or false.") do
    refute(true)
  end
end
test_with_message() click to toggle source
# File test-unit-3.3.4/test/test-assertions.rb, line 1578
def test_with_message
  check_fail("failed refute.\n" +
               "<true> is neither nil or false.") do
    refute(true, "failed refute")
  end
end