package App::Const;
use Const::Common( HOGE => 10, );
1;
use strict;
use warnings;
use utf8;
use App::Const;
use Test::More;
use Test::Mock::Guard;
is HOGE, 10, "orig";
{
my $guard = mock_guard "App::Const" => { HOGE => 100, };
is HOGE, 100, "overwrite";
}
done_testing;
ok 1 - orig
not ok 2 - overwrite
# Failed test 'overwrite'
# at t/test.t line 13.
# got: '10'
# expected: '100'
1..2
# Looks like you failed 1 test of 2.