使预期对象和实际对象的比较变得非常困难:
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}
由于这一行输出,很难找到一个值的差异。在debug中使用“po”打印相同的对象会使输出多行。
知道如何使这个输出多线?