Fix typo in instructions
[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
83c2705f 7# role. Use full_name as the output for the as_string method. The
10086130 8# Employee subclass should still override this output.
9#
b4d2756a 10# Implement a role HasAccount. This should provide a read-write
10086130 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#
edc83363 17# Make the Person class consumes this role as well.
10086130 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
10086130 28MooseClass::Tests::tests02();