Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Having a single method be simultaniously a setup and teardown method no longer supported - The undocumented add_method method, that you should not have been using anyway, disappears
- Loading branch information
adrianh
committed
Feb 20, 2004
1 parent
18b67fd
commit 190a012
Showing
9 changed files
with
73 additions
and
50 deletions.
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
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,26 @@ | ||
#! /usr/bin/perl | ||
|
||
use strict; | ||
use warnings; | ||
use Test::More 'no_plan'; | ||
use constant CLASS => 'Test::Class::MethodInfo'; | ||
BEGIN { use_ok( CLASS) }; | ||
|
||
{ | ||
isa_ok my $o = CLASS->new(name=> 'foo'), CLASS; | ||
ok $o->is_type('test'), 'method type is test by default'; | ||
is $o->num_tests, 1, 'test methods default to 1 test'; | ||
}; | ||
|
||
{ | ||
isa_ok my $o = CLASS->new(name=> 'foo', num_tests => 0), CLASS; | ||
is $o->num_tests, 0, 'test method can have zero tests'; | ||
}; | ||
|
||
{ | ||
foreach my $type qw(setup teardown startup shutdown) { | ||
isa_ok my $o = CLASS->new(name=> 'foo', type=> $type), CLASS, $type; | ||
ok $o->is_type($type), "method type is $type"; | ||
is $o->num_tests, 0, "$type methods default to 0 test"; | ||
}; | ||
}; |
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