summaryrefslogtreecommitdiff
path: root/t/exceptions/overload.t
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2015-06-06 17:50:16 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2015-06-06 17:50:16 +0000
commit5ac2026f7eed78958d69d051e7a8e993dcf51205 (patch)
tree298c3d2f08bdfe5689998b11892d72a897985be1 /t/exceptions/overload.t
downloadMoose-tarball-master.tar.gz
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;