test I never noticed to add
Matt S Trout [Sun, 21 Oct 2007 22:17:35 +0000 (22:17 +0000)]
t/build_sub_installer.t [new file with mode: 0644]

diff --git a/t/build_sub_installer.t b/t/build_sub_installer.t
new file mode 100644 (file)
index 0000000..8a73730
--- /dev/null
@@ -0,0 +1,20 @@
+use strict;
+use warnings;
+use Test::More 'no_plan';
+
+use Devel::Declare ();
+
+BEGIN {
+  Devel::Declare->build_sub_installer('Foo', 'bar', '&')
+                ->(sub { $_[0]->("woot"); });
+}
+
+my $args;
+
+{
+  package Foo;
+
+  bar { $args = join(', ', @_); };
+}
+
+is($args, 'woot', 'sub installer worked');