Module: ObjectComparator::Minitest
- Defined in:
- lib/object_comparator/minitest.rb
Instance Method Summary collapse
- #assert_equal_objects(expected, actual, message = nil) ⇒ Object
- #refute_equal_objects(expected, actual, message = nil) ⇒ Object
Instance Method Details
#assert_equal_objects(expected, actual, message = nil) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/object_comparator/minitest.rb', line 5 def assert_equal_objects(expected, actual, = nil) expected = InspectionString.new(expected.inspect) actual = InspectionString.new(actual.inspect) ||= ObjectComparator.new.(expected, actual) assert_equal(expected, actual, ) end |
#refute_equal_objects(expected, actual, message = nil) ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/object_comparator/minitest.rb', line 14 def refute_equal_objects(expected, actual, = nil) expected = InspectionString.new(expected.inspect) actual = InspectionString.new(actual.inspect) ||= ObjectComparator.new.(expected, actual) refute_equal(expected, actual, ) end |