summaryrefslogtreecommitdiff
path: root/t/exceptions/cmop.t
diff options
context:
space:
mode:
Diffstat (limited to 't/exceptions/cmop.t')
-rw-r--r--t/exceptions/cmop.t20
1 files changed, 20 insertions, 0 deletions
diff --git a/t/exceptions/cmop.t b/t/exceptions/cmop.t
new file mode 100644
index 0000000..9021591
--- /dev/null
+++ b/t/exceptions/cmop.t
@@ -0,0 +1,20 @@
+use strict;
+use warnings;
+
+use Test::More;
+use Test::Fatal;
+
+use Class::MOP;
+
+{
+ my $exception = exception {
+ Class::MOP::Mixin->_throw_exception(Legacy => message => 'oh hai');
+ };
+ ok(
+ $exception->isa('Moose::Exception::Legacy'),
+ 'threw the right type',
+ );
+ is($exception->message, 'oh hai', 'got the message attribute');
+}
+
+done_testing;