Skip to content

Commit e79a7d8

Browse files
haargkarenetheridge
authored andcommitted
remove test checking namespace::autoclean against Test::CleanNamespaces
The test was using namespace::autoclean to clean a namespace, then checking that it was cleaned via Test::CleanNamespaces. This essentially ends up only being a test of the external modules, not anything about Moose itself. Both modules are using Moose to get the list of methods. If that method list was wrong, the test would still pass because the same list is being provided to both modules. And Moose's tests don't need to include tests that are only of external modules.
1 parent 181627d commit e79a7d8

File tree

2 files changed

+0
-13
lines changed

2 files changed

+0
-13
lines changed

dist.ini

-1
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,6 @@ code = s{^(note 'Checking Changes')}{if \(\(\$ENV\{TRAVIS_PULL_REQUEST\} \|\| ''
315315
;authordep warnings = 1.03
316316
317317
[Prereqs / TestRequires]
318-
Test::CleanNamespaces = 0.13
319318
Test::Fatal = 0.001
320319
Test::More = 0.96
321320
Test::Needs = 0.002010

t/metaclasses/exporter_sub_names.t

-12
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,17 @@
11
use strict;
22
use warnings;
33

4-
use Test::CleanNamespaces;
54
use Test::More;
65

76
{
87
package Metarole;
98
use Moose::Role;
109
}
1110

12-
$::HAS_NC_AC = 0;
13-
1411
{
1512
package Foo;
1613
use Moose ();
1714
use Moose::Exporter;
18-
{
19-
local $@;
20-
eval 'use namespace::autoclean; $::HAS_NC_AC = 1';
21-
}
2215

2316
Moose::Exporter->setup_import_methods(
2417
also => 'Moose',
@@ -33,12 +26,7 @@ $::HAS_NC_AC = 0;
3326
::is( $package, __PACKAGE__, "$name sub is in Foo package" );
3427
::is( $sub_name, $name, "$name sub has that name, not __ANON__" );
3528
}
36-
}
3729

38-
if ($::HAS_NC_AC) {
39-
$INC{'Foo.pm'} = 1;
40-
namespaces_clean('Foo');
4130
}
4231

4332
done_testing();
44-

0 commit comments

Comments
 (0)