summaryrefslogtreecommitdiff
path: root/t/exceptions/overload.t
diff options
context:
space:
mode:
Diffstat (limited to 't/exceptions/overload.t')
-rw-r--r--t/exceptions/overload.t15
1 files changed, 15 insertions, 0 deletions
diff --git a/t/exceptions/overload.t b/t/exceptions/overload.t
new file mode 100644
index 0000000..8d01e35
--- /dev/null
+++ b/t/exceptions/overload.t
@@ -0,0 +1,15 @@
+use strict;
+use warnings;
+
+use Test::More;
+use Moose::Exception;
+
+my $exception = Moose::Exception->new(message => 'barf!');
+
+like($exception, qr/barf/, 'stringification for regex works');
+
+ok($exception ne 'oh hai', 'direct string comparison works');
+
+ok($exception, 'exception can be treated as a boolean');
+
+done_testing;