File: prototype.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 (30 lines) | stat: -rw-r--r-- 414 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
use warnings;
use strict;

use Test::More;
use Test::Warnings;

package Mockee;

sub good ($$);

sub good ($$) {
    my ( $bar, $baz ) = @_;
    return ( $bar + 1, $baz + 2 );
}

1;

package main;

use Test::MockModule;

$INC{'Mockee.pm'} = 1;
my $mocker = Test::MockModule->new('Mockee');

$mocker->redefine( 'good', 2 );

done_testing();

#----------------------------------------------------------------------