Subject: | 008_configfromfile.t fails if MooseX::ConfigFromFile missing |
If MooseX::ConfigFromFile is not installed 008_configfromfile.t fails,
see attached test-output.txt. The reason is because Test::NoWarnings and
Test::Require don't interact properly. I attached the patch that fixes
this problem.
--
Pavel Shaydo
Subject: | test-output.txt |
$ prove -lv t/008_configfromfile.t
t/008_configfromfile.t ..
1..38
ok 1 # skip Test requires module 'MooseX::ConfigFromFile' but it's not found
ok 2 # skip Test requires module 'MooseX::ConfigFromFile' but it's not found
ok 3 # skip Test requires module 'MooseX::ConfigFromFile' but it's not found
ok 4 # skip Test requires module 'MooseX::ConfigFromFile' but it's not found
ok 5 # skip Test requires module 'MooseX::ConfigFromFile' but it's not found
ok 6 # skip Test requires module 'MooseX::ConfigFromFile' but it's not found
ok 7 # skip Test requires module 'MooseX::ConfigFromFile' but it's not found
ok 8 # skip Test requires module 'MooseX::ConfigFromFile' but it's not found
ok 9 # skip Test requires module 'MooseX::ConfigFromFile' but it's not found
ok 10 # skip Test requires module 'MooseX::ConfigFromFile' but it's not found
ok 11 # skip Test requires module 'MooseX::ConfigFromFile' but it's not found
ok 12 # skip Test requires module 'MooseX::ConfigFromFile' but it's not found
ok 13 # skip Test requires module 'MooseX::ConfigFromFile' but it's not found
ok 14 # skip Test requires module 'MooseX::ConfigFromFile' but it's not found
ok 15 # skip Test requires module 'MooseX::ConfigFromFile' but it's not found
ok 16 # skip Test requires module 'MooseX::ConfigFromFile' but it's not found
ok 17 # skip Test requires module 'MooseX::ConfigFromFile' but it's not found
ok 18 # skip Test requires module 'MooseX::ConfigFromFile' but it's not found
ok 19 # skip Test requires module 'MooseX::ConfigFromFile' but it's not found
ok 20 # skip Test requires module 'MooseX::ConfigFromFile' but it's not found
ok 21 # skip Test requires module 'MooseX::ConfigFromFile' but it's not found
ok 22 # skip Test requires module 'MooseX::ConfigFromFile' but it's not found
ok 23 # skip Test requires module 'MooseX::ConfigFromFile' but it's not found
ok 24 # skip Test requires module 'MooseX::ConfigFromFile' but it's not found
ok 25 # skip Test requires module 'MooseX::ConfigFromFile' but it's not found
ok 26 # skip Test requires module 'MooseX::ConfigFromFile' but it's not found
ok 27 # skip Test requires module 'MooseX::ConfigFromFile' but it's not found
ok 28 # skip Test requires module 'MooseX::ConfigFromFile' but it's not found
ok 29 # skip Test requires module 'MooseX::ConfigFromFile' but it's not found
ok 30 # skip Test requires module 'MooseX::ConfigFromFile' but it's not found
ok 31 # skip Test requires module 'MooseX::ConfigFromFile' but it's not found
ok 32 # skip Test requires module 'MooseX::ConfigFromFile' but it's not found
ok 33 # skip Test requires module 'MooseX::ConfigFromFile' but it's not found
ok 34 # skip Test requires module 'MooseX::ConfigFromFile' but it's not found
ok 35 # skip Test requires module 'MooseX::ConfigFromFile' but it's not found
ok 36 # skip Test requires module 'MooseX::ConfigFromFile' but it's not found
ok 37 # skip Test requires module 'MooseX::ConfigFromFile' but it's not found
ok 38 # skip Test requires module 'MooseX::ConfigFromFile' but it's not found
ok 39 - no warnings
# Looks like you planned 38 tests but ran 39.
Dubious, test returned 255 (wstat 65280, 0xff00)
All 38 subtests passed
(less 38 skipped subtests: 0 okay)
Test Summary Report
-------------------
t/008_configfromfile.t (Wstat: 65280 Tests: 39 Failed: 1)
Failed test: 39
Non-zero exit status: 255
Parse errors: Bad plan. You planned 38 tests but ran 39.
Files=1, Tests=39, 0 wallclock secs ( 0.03 usr 0.01 sys + 0.02 cusr 0.00 csys = 0.06 CPU)
Result: FAIL
Subject: | explicit-had_no_warnings-test.patch |
diff --git a/t/008_configfromfile.t b/t/008_configfromfile.t
index 44b20fe..e0be70e 100644
--- a/t/008_configfromfile.t
+++ b/t/008_configfromfile.t
@@ -4,7 +4,7 @@ use warnings;
use Test::More tests => 38;
use Test::Fatal;
use File::Spec;
-use Test::NoWarnings 1.04 ':early';
+require Test::NoWarnings;
use Test::Requires {
'MooseX::ConfigFromFile' => 0.01, # skip all if not installed
@@ -228,3 +228,5 @@ sub app_ok {
is( $app->required_from_argv, '1',
'... required_from_argv is 1 as expected' );
}
+
+Test::NoWarnings::had_no_warnings;