From 636f22f307ff0dc94a2c2ec23d49c872ecddbc02 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 19 Jul 2010 19:10:14 -0500 Subject: initial implementation --- t/moose/021_export_with_prototype.t | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 t/moose/021_export_with_prototype.t (limited to 't/moose/021_export_with_prototype.t') diff --git a/t/moose/021_export_with_prototype.t b/t/moose/021_export_with_prototype.t new file mode 100644 index 0000000..6c8f5e2 --- /dev/null +++ b/t/moose/021_export_with_prototype.t @@ -0,0 +1,22 @@ +use lib "t/lib"; +package MyExporter::User; +use MyExporter; + +use Test::More; +use Test::Exception; + +lives_and { + with_prototype { + my $caller = caller(0); + is($caller, 'MyExporter', "With_caller prototype code gets called from MyMooseX"); + }; +} "check function with prototype"; + +lives_and { + as_is_prototype { + my $caller = caller(0); + is($caller, 'MyExporter', "As-is prototype code gets called from MyMooseX"); + }; +} "check function with prototype"; + +done_testing; -- cgit v1.2.3-54-g00ecf