On Tue, May 12, 2015 at 11:03:01PM +0200, Moritz Lenz wrote:
> I'm curious, what's a case where private state of a class needs to be
> tested, and tests agains the public interface are not enough?
> In my experience, testing against private parts only makes the tests
> more brittle (that is, ever
On Mon, May 11, 2015 at 03:22:46PM -0700, Darren Duncan wrote:
> you can use "trusts". Also having to do this may indicate bad code
> design. -- Darren Duncan
I saw Moritz' and Carl's responses and I agree with the smell
issue.
Given that the code exists and needs testing, 'augment' seems
pre
> I need to test some private routines, so is there a way to do that?
Is there a downsize to augment for this?
# source
class Dog {
method bark { say( "#bark"); return "bark" }
method !pee { say( "#pee" ); return "pee"}
}
# test
#use MONKEY_TYPING;
use Test;
use v6;
plan 4;
my Dog