fix bug reported by Strayph in #moose where a subclass would not inherit the Role...
[gitmo/MooseX-ConfigFromFile.git] / t / 02subclass.t
diff --git a/t/02subclass.t b/t/02subclass.t
new file mode 100644 (file)
index 0000000..fec2590
--- /dev/null
@@ -0,0 +1,22 @@
+#!/usr/bin/env perl 
+use strict;
+use Test::More;
+use Test::Exception;
+{
+    package A;
+    use Moose;
+    with qw(MooseX::ConfigFromFile);
+    
+    sub get_config_from_file { }
+}
+
+{
+    package B;
+    use Moose;
+    extends qw(A);
+}
+
+ok(B->does('MooseX::ConfigFromFile'), 'B does ConfigFromFile');
+lives_ok { B->new_with_config() } 'B->new_with_config lives';
+
+done_testing();