- or download this
use Test::More 'no_plan';
eval "require My::Module; My::Module->import()";
# test behaviors without INIT/CHECK
- or download this
# t/Test/BehaviorA.pm
package t::Test::BehaviorA;
...
# put 42 tests for Behavior A here
}
1; # need this
- or download this
# 01-test-A-normal.t
use t::Test::BehaviorA qw( run_tests_for_A );
...
use My::Module;
run_tests_for_A();
- or download this
# 01-test-A-persistant.t
use t::Test::BehaviorA qw( run_tests_for_A );
...
eval "require My::Module; My::Module->import()";
run_tests_for_A();