Assert::Refute::Driver::More - Test::More compatibility layer for Asser::Refute suite
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;
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.
We override some methods of Assert::Refute::Report below so that test results are fed to the more backend.
Will automatically load Test::Builder instance, which is assumed to be a singleton as of this writing.
The allmighty refute() boils down to
ok !$condition, $message or diag $condition;
Proxy to Test::More's subtest.
Proxy for done_testing in Test::More.
done_testing
Just fall back to diag/note. Indentation is ignored.
Current test number.
Tell if the whole set is passing.
Fetch result of n-th test.
0 is for passing tests, a true value is for failing ones.
This module is part of Assert::Refute suite.
Copyright 2017-2018 Konstantin S. Uvarin. <khedin at cpan.org>
<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:
http://www.perlfoundation.org/artistic_license_2_0
To install Assert::Refute, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Assert::Refute
CPAN shell
perl -MCPAN -e shell install Assert::Refute
For more information on module installation, please visit the detailed CPAN module installation guide.