NAME
Assert::Refute::Driver::More - Test::More compatibility layer for Asser::Refute suite
SYNOPSIS
In your test script:
use Test::More;
use Assert::Refute qw(:all); # in that order
my $def = contract {
# don't use is/ok/etc here
my ($c, @args) = @_;
$c->is (...);
$c->like (...);
};
is foo(), $bar, "Normal test";
subcontract "Repeated test block 1", $def, $value1;
like $string, qr/.../, "Another normal test";
subcontract "Repeated test block 2", $def, $value2;
done_testing;
DESCRIPTION
This class is useless in and of itself. It is auto-loaded as a bridge between Test::More and Assert::Refute, if Test::More has been loaded before Assert::Refute.
METHODS
We override some methods of Assert::Refute::Report below so that test results are fed to the more backend.
new
Will automatically load Test::Builder instance, which is assumed to be a singleton as of this writing.
refute( $condition, $message )
The allmighty refute() boils down to
ok !$condition, $message
or diag $condition;
subcontract
Proxy to Test::More's subtest.
done_testing
Proxy for done_testing
in Test::More.
do_log( $indent, $level, $message )
Just fall back to diag/note. Indentation is ignored.
get_count
Current test number.
is_passing
Tell if the whole set is passing.
get_result
Fetch result of n-th test.
0 is for passing tests, a true value is for failing ones.
LICENSE AND COPYRIGHT
This module is part of Assert::Refute suite.
Copyright 2017-2018 Konstantin S. Uvarin. <khedin at cpan.org>
This program is free software; you can redistribute it and/or modify it under the terms of the the Artistic License (2.0). You may obtain a copy of the full license at: