Skip to content

Commit

Permalink
reject Moose::Object methods as test names
Browse files Browse the repository at this point in the history
  • Loading branch information
rjbs committed Jun 2, 2011
1 parent b010a86 commit 7cd924d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Changes
Expand Up @@ -2,6 +2,8 @@ Revision history for {{$dist->name}}

{{$NEXT}}

reject test names that conflict with Moose::Object methods

0.011 2011-05-31 10:49:59 America/New_York

install tests with package separators in their name under munged
Expand Down
3 changes: 3 additions & 0 deletions lib/Test/Routine.pm
Expand Up @@ -250,6 +250,9 @@ sub test {
Carp::croak "can't have two tests with the same name ($name)"
if $class->get_method($name);

Carp::croak "can't name a test after a Moose::Object method ($name)"
if Moose::Object->can($name);

$class->add_method($name => $method);
}

Expand Down

0 comments on commit 7cd924d

Please sign in to comment.