What makes comparison of the expected and actual object quite difficult:
error: -[MyServiceSpec test_ MyServiceSpec__first_object__should_be_an_exact_meter_reading] : expected: <MyClassName: 0x7f8579c67970> {\n actual = 4650;\n expected = 4561;\n meterReadingDate = "2015-10-26 00:00:00 +0000";\n price = "0.05355";\n productType = Electricity;\n}, got: < MyClassName: 0x7f8579c6aed0> {\n actual = 4650;\n expected = 4560;\n meterReadingDate = "2015-10-26 00:00:00 +0000";\n price = "0.05355";\n productType = Electricity;\n}
There's a difference in one value which is hard to find due to this one line output. Printing the same object with "po" in debug makes the output multiline.
Any idea how to make this output multiline?
Aucun commentaire:
Enregistrer un commentaire