projects
/
gitmo/moose-presentations.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
4b37a21
)
Test deposit() before testing withdraw()
Dave Rolsky [Sun, 10 Oct 2010 15:43:41 +0000 (11:43 -0400)]
moose-class/exercises/t/lib/MooseClass/Tests.pm
patch
|
blob
|
blame
|
history
diff --git
a/moose-class/exercises/t/lib/MooseClass/Tests.pm
b/moose-class/exercises/t/lib/MooseClass/Tests.pm
index
4fdf477
..
9fc3a8f
100644
(file)
--- a/
moose-class/exercises/t/lib/MooseClass/Tests.pm
+++ b/
moose-class/exercises/t/lib/MooseClass/Tests.pm
@@
-683,6
+683,12
@@
sub account_tests {
my $base_amount = shift || 0;
$person->deposit(50);
+
+ is(
+ $person->balance, 50 + $base_amount,
+ "balance is 50 + $base_amount",
+ );
+
eval { $person->withdraw( 75 + $base_amount ) };
like(
$@, qr/\QBalance cannot be negative/,