instrumented to abort tests if the macro does not load
This commit is contained in:
parent
5e7c0faf68
commit
d756069c43
1 changed files with 11 additions and 2 deletions
|
|
@ -65,9 +65,16 @@ foreach my $testSet (@testSets) {
|
||||||
$numTests += 1 + (ref $testSet->{output} eq 'CODE');
|
$numTests += 1 + (ref $testSet->{output} eq 'CODE');
|
||||||
}
|
}
|
||||||
|
|
||||||
plan tests => $numTests + 1;
|
$numTests += 1; #For the use_ok
|
||||||
|
|
||||||
use_ok('WebGUI::Macro::a_account');
|
plan tests => $numTests;
|
||||||
|
|
||||||
|
my $macro = 'WebGUI::Macro::a_account';
|
||||||
|
my $loaded = use_ok($macro);
|
||||||
|
|
||||||
|
SKIP: {
|
||||||
|
|
||||||
|
skip "Unable to load $macro", $numTests-1 unless $loaded;
|
||||||
|
|
||||||
foreach my $testSet (@testSets) {
|
foreach my $testSet (@testSets) {
|
||||||
my $output = WebGUI::Macro::a_account::process( $session,
|
my $output = WebGUI::Macro::a_account::process( $session,
|
||||||
|
|
@ -83,6 +90,8 @@ foreach my $testSet (@testSets) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
sub addTemplate {
|
sub addTemplate {
|
||||||
$session->user({userId=>3});
|
$session->user({userId=>3});
|
||||||
my $importNode = WebGUI::Asset->getImportNode($session);
|
my $importNode = WebGUI::Asset->getImportNode($session);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue