Work around 5.6.2 warnings
[gitmo/Mouse.git] / t / 010_basics / 017_error_handling.t
CommitLineData
60ad2cb7 1#!/usr/bin/perl
2
3use strict;
4use warnings;
5
6use Test::More tests => 3;
7use Test::Exception;
8
9# This tests the error handling in Mouse::Object only
10
11{
12 package Foo;
13 use Mouse;
14}
15
16throws_ok { Foo->new('bad') } qr/^\QSingle parameters to new() must be a HASH ref/,
17 'A single non-hashref arg to a constructor throws an error';
18throws_ok { Foo->new(undef) } qr/^\QSingle parameters to new() must be a HASH ref/,
19 'A single non-hashref arg to a constructor throws an error';
20
21throws_ok { Foo->does() } qr/^\QYou must supply a role name to does()/,
22 'Cannot call does() without a role name';