]> git.vpit.fr Git - perl/modules/Acme-CPANAuthors-You-re_using.git/blobdiff - t/10-base.t
Remove '.' from @INC in the t/10-base.t test
[perl/modules/Acme-CPANAuthors-You-re_using.git] / t / 10-base.t
index 01ca3ac9cd7358869cbde33b85e2b9c29c7ab716..cab221723d939bef3ff4af46f2277e6aad59b7ec 100644 (file)
@@ -7,8 +7,16 @@ use Test::More;
 
 use Acme::CPANAuthors;
 
+local @INC = grep $_ ne '.', @INC;
+
 my $authors = eval {
- local $SIG{__WARN__} = sub { die @_ };
+ local $SIG{__WARN__} = sub {
+  my ($msg) = @_;
+  if ($msg =~ /^You're_using CPAN Authors are not registered yet: (.*)/s) {
+   die $1;
+  }
+  CORE::warn(@_);
+ };
  Acme::CPANAuthors->new("You're_using");
 };
 
@@ -18,6 +26,9 @@ if ($authors) {
  plan skip_all => $@;
 }
 
+diag 'Directories in @INC :';
+diag "  $_" for @INC;
+
 my $count = $authors->count;
 diag "$count authors found";
 cmp_ok $count, '>', 0, 'there are some authors';
@@ -25,4 +36,4 @@ cmp_ok $count, '>', 0, 'there are some authors';
 is   $authors->name('???'),      undef,         'wrong name';
 is   $authors->name('VPIT'),     'Vincent Pit', 'we should at least have this module';
 isnt $authors->name('ISHIGAKI'), undef,         'we should at least have Acme::CPANAuthors\' author';
-isnt $authors->name('LBROCARD'), undef,         'we should at least have Parse::CPAN::* author';
+isnt $authors->name('GAAS'),     undef,         'we should at least have LWP\'s author';