forked from mjgardner/test-class
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
adrianh
committed
Apr 6, 2008
1 parent
8d3168b
commit 059c135
Showing
4 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#! /usr/bin/perl -T | ||
|
||
use strict; | ||
use warnings FATAL => 'all'; | ||
use Test::Exception; | ||
use Test::More tests => 2; | ||
|
||
BEGIN { use_ok 'Test::Class' }; | ||
|
||
dies_ok { Test::Class->runtests( 'Not::A::Test::Class' ) } | ||
'runtests dies if we are given something that is not a test class'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#! /usr/bin/perl -T | ||
|
||
use strict; | ||
use warnings FATAL => 'all'; | ||
use Test::More tests => 1; | ||
|
||
my $shutdown_has_run; | ||
|
||
{ package My::Test; | ||
use base qw( Test::Class ); | ||
use Test::More; | ||
|
||
sub shutdown :Test( shutdown ) { | ||
$shutdown_has_run = 1; | ||
} | ||
|
||
} | ||
|
||
My::Test->runtests( +1 ); | ||
ok $shutdown_has_run, "shutdown method has run"; |