projects
/
engit/Iron-Munger.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
0c01b3a2fe6b117750af1035e31c4a343d541187
[engit/Iron-Munger.git]
/
t
/
calculate_level.t
1
use strict;
2
use warnings;
3
use Test::More qw(no_plan);
4
5
BEGIN {
6
use_ok 'IronMunger::Calculate', 'level_for_post_count';
7
}
8
9
my @spec = qw(
10
0 paper
11
3 paper
12
4 stone
13
11 stone
14
12 bronze
15
35 bronze
16
36 iron
17
50 iron
18
);
19
20
while (@spec > 2) {
21
my ($count, $level) = (shift(@spec),shift(@spec));
22
is(level_for_post_count($count), $level, "${count} posts means ${level} man");
23
}