Skip Menu |

This queue is for tickets about the MooseX-Test-Role CPAN distribution.

Report information
The Basics
Id: 94044
Status: resolved
Priority: 0/
Queue: MooseX-Test-Role

People
Owner: pboyd [...] cpan.org
Requestors: tomas.zemres [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.05
Fixed in: 0.06



Subject: Testing methods overridden in tested role is buggy
I attached testing file, see it for details. It returns "All tests successful." with version MooseX::Test::Role 0.03 but it fails with version MooseX::Test::Role 0.05 # Failed test 'MooseX::Test::Role appends data to output' # at MockTest.t line 25. # Structures begin differing at: # $got->[2] = Does not exist # $expected->[2] = 'suffix' # Looks like you failed 1 test of 1.
Subject: MockTest.t
package TestRole::Appender; use Moose::Role; requires 'get_output'; around get_output => sub { my ($super, $self) = @_; return ($self->$super, 'suffix'); }; 1; package main; use Test::Spec; use MooseX::Test::Role; describe "MooseX::Test::Role" => sub { it "appends data to output" => sub { my $consumer = consumer_of('TestRole::Appender', get_output => sub { ('orig-A','orig-B') } ); is_deeply( [ $consumer->get_output() ], [ 'orig-A', 'orig-B', 'suffix' ] ); }; }; runtests;
This should be fixed in v0.06.