diff options
Diffstat (limited to 'tool')
-rw-r--r-- | tool/lib/test/unit/core_assertions.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tool/lib/test/unit/core_assertions.rb b/tool/lib/test/unit/core_assertions.rb index adb797ba16..235b116cb7 100644 --- a/tool/lib/test/unit/core_assertions.rb +++ b/tool/lib/test/unit/core_assertions.rb @@ -635,6 +635,22 @@ eom super end end + + def diff(exp, act) + require 'pp' + q = PP.new(+"") + q.guard_inspect_key do + q.group(2, "expected: ") do + q.pp exp + end + q.text q.newline + q.group(2, "actual: ") do + q.pp act + end + q.flush + end + q.output + end end end end |