remove test dependency on Test::Without::Module (RT#115394)
[p5sagit/JSON-MaybeXS.git] / t / pp.t
diff --git a/t/pp.t b/t/pp.t
index f75fa20..9aa020f 100644 (file)
--- a/t/pp.t
+++ b/t/pp.t
@@ -1,10 +1,18 @@
 use strict;
-use warnings FATAL => 'all';
-use Test::Without::Module 'Cpanel::JSON::XS', 'JSON::XS';
-use if !do { require JSON::PP; 1; }, 'Test::More', skip_all => 'No JSON::PP';
-use Test::More;
+use warnings;
+
+# hide Cpanel::JSON::XS, JSON::XS
+use lib map {
+    my ( $m, $c ) = ( $_, qq{die "Can't locate $_ (hidden)\n"} );
+    sub { return unless $_[1] eq $m; open my $fh, "<", \$c; return $fh }
+} qw{Cpanel/JSON/XS.pm JSON/XS.pm};
+
+use if !eval { require JSON::PP; 1; }, 'Test::More', skip_all => 'No JSON::PP';
+use Test::More 0.88;
 use JSON::MaybeXS;
 
+diag 'Using JSON::PP ', JSON::PP->VERSION;
+
 is(JSON, 'JSON::PP', 'Correct JSON class');
 
 is(
@@ -17,4 +25,6 @@ is(
   'Correct encode_json function'
 );
 
+require 't/lib/is_bool.pm';
+
 done_testing;