Module: TestEqualityWithLCS::Unit

Includes:
SharedMethods
Defined in:
lib/test_equality_with_lcs/unit.rb

Instance Method Summary collapse

Methods included from SharedMethods

included

Instance Method Details

#assert_equal_with_lcs(string1, string2) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/test_equality_with_lcs/unit.rb', line 6

def assert_equal_with_lcs string1, string2
  # depending on the size of the strings
  # and since we generate the error message
  # before running the assertion
  # we want to bypass this behavior for the sake of speed
  return if string1 == string2

  message = message_for_argument_types string1, string2
  assert_block message do
    string1 == string2
  end
end