Method: RubyUnit::Assertions::Comparisons#assertNotEqual

Defined in:
lib/RubyUnit/Assertions/Comparisons.rb

#assertNotEqual(illegal, actual, message = nil) ⇒ Object

Assert that two values are NOT equal.

  • raises RubyUnit::AssertionFailure if illegal equals actual

illegal

The value that is not allowed by the assertion

actual

The value that is being checked by the assertion

message

The message provided to be reported for a failure

assertNotEqual 3.14, 3.14, "This will fail"  # => fail


43
44
45
# File 'lib/RubyUnit/Assertions/Comparisons.rb', line 43

def assertNotEqual illegal, actual, message = nil
  __reject (illegal == actual), ASSERT_NOT_EQUAL_ERROR, message, {:illegal=>illegal, :actual=>actual} 
end