update repo to point to github
[gitmo/Moo.git] / t / sub-quote.t
index 4cc9a1d..301366e 100644 (file)
@@ -47,4 +47,16 @@ like(
   'exception contains correct name'
 );
 
+quote_sub 'Foo::four' => q{
+  return 5;
+};
+
+my $quoted = quoted_from_sub(\&Foo::four);
+like $quoted->[1], qr/return 5;/,
+  'can get quoted from installed sub';
+Foo::four();
+my $quoted2 = quoted_from_sub(\&Foo::four);
+is $quoted2->[1], undef,
+  "can't get quoted from installed sub after undefer";
+
 done_testing;