-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure we can redefine a function in 'main'
This is broken with SUPER 1.17, we need a version >1.20 This is bumping the version requirement for SUPER to 1.20* and also adding one exception for the package namespace 'main'
- Loading branch information
1 parent
0538fe1
commit 7558aa9
Showing
3 changed files
with
18 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
use warnings; | ||
use strict; | ||
|
||
use Test::More; | ||
use Test::Warnings; | ||
|
||
use Test::MockModule; | ||
|
||
sub fourofour { 404 } | ||
|
||
my $mocker = Test::MockModule->new('main')->redefine( fourofour => 200 ); | ||
|
||
is fourofour(), 200, "can mock a function in main # need SUPER > 1.17"; | ||
|
||
done_testing(); |