class Test::Unit::TestAssertNotEmpty

Public Instance Methods

test_fail() click to toggle source
# File test-unit-3.3.4/test/test-assertions.rb, line 2125
def test_fail
  check_fail("<[]> was expected to not be empty.") do
    assert_not_empty([])
  end
end
test_fail_because_no_empty_method() click to toggle source
# File test-unit-3.3.4/test/test-assertions.rb, line 2138
def test_fail_because_no_empty_method
  object = Object.new
  inspected_object = AssertionMessage.convert(object)
  check_fail("The object must respond to :empty?.\n" +
              "<#{inspected_object}>.respond_to?(:empty?) expected\n" +
              "(Class: <Object>)") do
    assert_not_empty(object)
  end
end
test_fail_with_message() click to toggle source
# File test-unit-3.3.4/test/test-assertions.rb, line 2131
def test_fail_with_message
  check_fail("message.\n" +
              "<[]> was expected to not be empty.") do
    assert_not_empty([], "message")
  end
end
test_pass() click to toggle source
# File test-unit-3.3.4/test/test-assertions.rb, line 2113
def test_pass
  check_nothing_fails do
    assert_not_empty([1])
  end
end
test_pass_with_message() click to toggle source
# File test-unit-3.3.4/test/test-assertions.rb, line 2119
def test_pass_with_message
  check_nothing_fails do
    assert_not_empty([1], "message")
  end
end