Permalink
Browse files

failing test for branching coverage of Moo attributes

  • Loading branch information...
1 parent 0d23ad2 commit ef3fd42d34a6a782416c8b346db37c3f71acad32 @wchristian wchristian committed Jun 5, 2012
Showing with 15 additions and 0 deletions.
  1. +15 −0 tests/moose_cond
View
@@ -32,3 +32,18 @@ sub wagh {
return $self->meep->{marp} || 0;
# return $self || 0;
}
+
+package Cover_branch_bug_Moo;
+
+use Moo;
+
+has config => ( is => 'lazy' );
+has config2 => ( is => 'ro' );
+
+__PACKAGE__->new( config => {}, config2 => {} )->trigger;
+__PACKAGE__->new( config => { debug => 1 }, config2 => { debug => 1 } )->trigger;
+
+sub trigger {
+ 1 if $_[0]->config->{debug};
+ 1 if $_[0]->config2->{debug};
+}

0 comments on commit ef3fd42

Please sign in to comment.