File: main.t

package info (click to toggle)
libtest-mockmodule-perl 0.180.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 192 kB
  • sloc: perl: 245; makefile: 2
file content (15 lines) | stat: -rw-r--r-- 274 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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();