Re: Sequential Mocking with Test::MockModule

2007-07-04 Thread Michael G Schwern
Ovid wrote: > - Original Message > From: Michael G Schwern <[EMAIL PROTECTED]> > >> How does it know when the is_broken tests have finished and the twinkletoes >> tests have begun? > > First, I think the method name should be 'mock_once' and each sub gets > wrapped with Hook::LexWrap >

Re: Sequential Mocking with Test::MockModule

2007-07-03 Thread Michael G Schwern
Ovid wrote: > And then, in my tests, I'll have something like: > > my $some_class = Test::MockModule->new($class); > $some_class->mock( is_broken => 1 ); > # is_broken tests > $some_class->unmock('is_broken'); > $some_class->mock( username => 'twinkletoes'); > # twinkletoes tests > $some_cl

Re: Sequential Mocking with Test::MockModule

2007-07-03 Thread Ovid
- Original Message From: Ovid <[EMAIL PROTECTED]> D'oh! You know, to make the behavior less mysterious, a better method name could be chosen: $some_class->mock_once( is_broken => 1, username => 'twinkletoes', is_inflatable => 1 ); # is_broken tests # twinkletoes tes