Permalink
Browse files

Add tests for methods without signatures.

  • Loading branch information...
1 parent a670103 commit e042bdc1af024a732a79dcd386e9037e3836ff1b @rafl committed Aug 1, 2009
Showing with 23 additions and 0 deletions.
  1. +23 −0 t/no_signature.t
View
@@ -0,0 +1,23 @@
+use strict;
+use warnings;
+use Test::More;
+use Test::Exception;
+
+{
+ package Foo;
+ use Moose;
+ use MooseX::Method::Signatures;
+ method bar { 42 }
+}
+
+my $foo = Foo->new;
+
+lives_ok(sub {
+ $foo->bar
+}, 'method without signature succeeds when called without args');
+
+lives_ok(sub {
+ $foo->bar(42)
+}, 'method without signature succeeds when called with args');
+
+done_testing;

0 comments on commit e042bdc

Please sign in to comment.