
Test::Run::Trap::Obj - wrapper around Test::Trap for trapping errors.

my $got = Test::Run::Trap::Obj->trap_run({
args => [test_files => ["t/sample-tests/simple"]]
});
$got->field_like("stdout", qr/All tests successful/,
"Everything is OK."
);

This class implements a wrapper around Test::Trap. When an assertion files, the diagnostics prints all the relevant and trapped fields for easy debugging.

Calls Test::More's diag() with alll the trapped fields, like stdout, stderr, etc.
A wrapper for Test::More's like(), that also emits more diagnostics on failure.
A wrapper for unlike().
A wrapper for is().
A wrapper for is_deeply().
Runs $class-$func()> with the arguments @args placed into a hash-ref, traps the results and returns a results object.

Shlomi Fish, http://www.shlomifish.org/.

This file is licensed under the MIT X11 License:
http://www.opensource.org/licenses/mit-license.php

Test::Trap , Test::More .