Typo fix
[gitmo/moose-presentations.git] / moose-class / exercises / t / 02-roles.t
CommitLineData
10086130 1# Your tasks ...
2#
3# Create a Printable role. This role should simply require that the
4# consuming class implement an "as_string" method.
5#
6# Make the Person class from the last set of exercises consume this
7# role. Use printable_name as the output for the as_string method. The
8# Employee subclass should still override this output.
9#
10# Implement a role HasMoney. This should provide a read-write
11# "balance" attribute. It should also implement "deposit" and
12# "withdraw" methods. Attempting to reduce the cash balance below 0
13# via "withdraw" should die with an error that includes the string:
14#
15# Balance cannot be negative
16#
17# Make the Person class consumes this role as well.
18#
19# Make sure all roles are free of Moose droppings.
20
21use strict;
22use warnings;
23
24use lib 't/lib';
25
26use MooseClass::Tests;
27
28use Person;
29use Employee;
30
31MooseClass::Tests::tests02();