@@ -, +, @@ order it fails most of the time, if not all the time. --- t/Letters.t | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) --- a/t/Letters.t +++ a/t/Letters.t @@ -8,10 +8,6 @@ use warnings; use Test::MockModule; use Test::More tests => 2; -BEGIN { - use_ok('C4::Letters'); -} - my $module = new Test::MockModule('C4::Context'); $module->mock( '_new_dbh', @@ -27,6 +23,8 @@ my $mock_letters = [ [ 'bleh', 'ISSN', 'NSSI', 'page', 0, 'blue', 'blehbleh' ] ]; +use_ok('C4::Letters'); + my $dbh = C4::Context->dbh(); $dbh->{mock_add_resultset} = $mock_letters; --