class Test::Unit::TestAssertions::TestAssertEqual::TestFailure

Public Instance Methods

test_with_message() click to toggle source
# File test-unit-3.3.4/test/test-assertions.rb, line 188
          def test_with_message
            message = <<-EOM.chomp
failed assert_equal.
<"string1"> expected but was
<"string2">.

diff:
- string1
?       ^
+ string2
?       ^
EOM
           check_fail(message) {
             assert_equal("string1", "string2", "failed assert_equal")
            }
          end
test_with_message_proc() click to toggle source
# File test-unit-3.3.4/test/test-assertions.rb, line 205
          def test_with_message_proc
            message = <<-EOM.chomp
failed assert_equal.
<"string1"> expected but was
<"string2">.

diff:
- string1
?       ^
+ string2
?       ^
EOM
           check_fail(message) do
              assert_equal("string1", "string2", lambda {"failed assert_equal"})
            end
          end
test_without_message() click to toggle source
# File test-unit-3.3.4/test/test-assertions.rb, line 172
          def test_without_message
            message = <<-EOM.chomp
<"string1"> expected but was
<"string2">.

diff:
- string1
?       ^
+ string2
?       ^
EOM
            check_fail(message) {
              assert_equal("string1", "string2")
            }
          end