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_class->unmock('is_broken');
>  $some_class->mock( is_inflatable => 1 );
>  # inflatable tests
>  $some_class->unmock('is_inflatable');
> 
> It would be nice to do something like:
> 
>   $some_class->sequential_mock(
>     is_broken => 1,
>     username => 'twinkletoes',
>     is_inflatable => 1
>   );
>   # is_broken tests
>   # twinkletoes tests
>   # inflatable tests
>  
> That does pull the tests a bit further away from the mocking, which could 
> confuse some, but it would be much nicer to write!
> 
> The code for this shouldn't be too hard, but I'm wondering if anyone thinks 
> this is a stupid idea, or if something like this belongs directly in 
> Test::MockModule?

How does it know when the is_broken tests have finished and the twinkletoes
tests have begun?

Reply via email to