Commit | Line | Data |
60ad2cb7 |
1 | #!/usr/bin/perl |
fde8e43f |
2 | # This is automatically generated by author/import-moose-test.pl. |
3 | # DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!! |
4 | use t::lib::MooseCompat; |
60ad2cb7 |
5 | |
6 | use strict; |
7 | use warnings; |
8 | |
fde8e43f |
9 | use Test::More; |
60ad2cb7 |
10 | use Test::Exception; |
11 | |
12 | # This tests the error handling in Mouse::Object only |
13 | |
14 | { |
15 | package Foo; |
16 | use Mouse; |
17 | } |
18 | |
19 | throws_ok { Foo->new('bad') } qr/^\QSingle parameters to new() must be a HASH ref/, |
20 | 'A single non-hashref arg to a constructor throws an error'; |
21 | throws_ok { Foo->new(undef) } qr/^\QSingle parameters to new() must be a HASH ref/, |
22 | 'A single non-hashref arg to a constructor throws an error'; |
23 | |
24 | throws_ok { Foo->does() } qr/^\QYou must supply a role name to does()/, |
25 | 'Cannot call does() without a role name'; |
fde8e43f |
26 | |
27 | done_testing; |