summaryrefslogtreecommitdiff
path: root/t/recipes/extending_debugging_baseclassrole.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/recipes/extending_debugging_baseclassrole.t
downloadMoose-tarball-5ac2026f7eed78958d69d051e7a8e993dcf51205.tar.gz
Diffstat (limited to 't/recipes/extending_debugging_baseclassrole.t')
-rw-r--r--t/recipes/extending_debugging_baseclassrole.t59
1 files changed, 59 insertions, 0 deletions
diff --git a/t/recipes/extending_debugging_baseclassrole.t b/t/recipes/extending_debugging_baseclassrole.t
new file mode 100644
index 0000000..a05181f
--- /dev/null
+++ b/t/recipes/extending_debugging_baseclassrole.t
@@ -0,0 +1,59 @@
+#!/usr/bin/perl -w
+
+use strict;
+use Test::More 'no_plan';
+use Test::Fatal;
+$| = 1;
+
+
+
+# =begin testing SETUP
+use Test::Requires 'Test::Output';
+
+
+
+# =begin testing SETUP
+{
+
+ package MooseX::Debugging;
+
+ use Moose::Exporter;
+
+ Moose::Exporter->setup_import_methods(
+ base_class_roles => ['MooseX::Debugging::Role::Object'],
+ );
+
+ package MooseX::Debugging::Role::Object;
+
+ use Moose::Role;
+
+ sub BUILD {}
+ after BUILD => sub {
+ my $self = shift;
+
+ warn "Made a new " . ( ref $self ) . " object\n";
+ };
+}
+
+
+
+# =begin testing
+{
+{
+ package Debugged;
+
+ use Moose;
+ MooseX::Debugging->import;
+}
+
+stderr_is(
+ sub { Debugged->new },
+ "Made a new Debugged object\n",
+ 'got expected output from debugging role'
+);
+}
+
+
+
+
+1;