bump version
[gitmo/Moo.git] / t / load_module.t
CommitLineData
5e03b55c 1# this test is replicated to t/load_module_role_tiny.t for Role::Tiny
2
2215d4b9 3# work around RT#67692
4use Moo::_Utils;
cd4896a8 5use strictures 1;
2215d4b9 6
cd4896a8 7use Test::More;
cd4896a8 8
9local @INC = (sub {
10 return unless $_[1] eq 'Foo/Bar.pm';
11 my $source = "package Foo::Bar; sub baz { 1 } 1";
12 open my $fh, '<', \$source;
13 $fh;
14}, @INC);
15
16{ package Foo::Bar::Baz; sub quux { } }
17
18_load_module("Foo::Bar");
19
20ok(eval { Foo::Bar->baz }, 'Loaded module ok');
21
22done_testing;