Test-Mini-Unit
view release on metacpan or search on metacpan
lib/Test/Mini/Unit.pm view on Meta::CPAN
# # __PACKAGE__ is 'Nested::CommonTests'
# }
#
# case Deeply {
# shared CommonTests {
# # __PACKAGE__ is 'Nested::Deeply::CommonTests'
# }
#
# # includes Nested::Deeply::CommonTests
# reuse CommonTests;
#
# # includes Nested::CommonTests
# reuse Nested::CommonTests;
#
# # includes CommonTests
# reuse ::CommonTests;
# }
#
# # includes Nested::CommonTests
# reuse CommonTests;
# }
#
# = Automatic 'use'
#
# To automatically use packages inside all your test cases (for example, your
# own custom assertions), simply pass the 'with' option to Test::Mini::Unit;
# it can accept either a single package name or an array.
#
# use Test::Mini::Unit (with => [ My::Assertions, My::HelperFuncs ]);
#
# case t::TestCase {
# # My::Assertions and My::HelperFuncs are already imported here.
# case Nested {
# # In here, too.
# }
#
# shared CommonTests {
# # Yup, here too.
# }
# }
#
# @see Test::Mini
# @author Pieter van de Bruggen <pvande@cpan.org>
package Test::Mini::Unit;
use strict;
use warnings;
use 5.008;
use version 0.77; our $VERSION = qv("v1.0.3");
use Test::Mini;
require Test::Mini::Unit::Sugar::Shared;
require Test::Mini::Unit::Sugar::TestCase;
# @api private
sub import {
my ($class, @args) = @_;
my $caller = caller();
strict->import;
warnings->import;
Test::Mini::Unit::Sugar::Shared->import(into => $caller, @args);
Test::Mini::Unit::Sugar::TestCase->import(into => $caller, @args);
}
1;
( run in 1.253 second using v1.01-cache-2.11-cpan-39bf76dae61 )