File: strict_scoped_files.t

package info (click to toggle)
libtest-mockmodule-perl 0.178.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 192 kB
  • sloc: perl: 245; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 464 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use strict;
use warnings;

use Test::More;

use lib 't/lib';

# things we're going to mock
use ScopedStrict::Mockee1;
use ScopedStrict::Mockee2;

# mock one of them in strict mode
use ScopedStrict::StrictMocker;
# this doesn't turn on strict mode, and tries to use ->mock(). It
# shouldn't crash
use ScopedStrict::NonStrictMocker;

# yay, we didn't crash!
pass "Using 'strict' mode in one module that we use didn't prevent ->mock()ing in another";
done_testing();