From 1fab785d644722668ea17cd0a988b496adb3cc9f Mon Sep 17 00:00:00 2001 From: Srdjan Date: Thu, 2 Mar 2017 13:31:14 +1300 Subject: [PATCH] Bug 16034 follow-up: better handling of absence of WebService::ILS::OverDrive::Patron at testing --- t/Koha_ExternalContent_OverDrive.t | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/t/Koha_ExternalContent_OverDrive.t b/t/Koha_ExternalContent_OverDrive.t index de70b3d..804893c 100755 --- a/t/Koha_ExternalContent_OverDrive.t +++ b/t/Koha_ExternalContent_OverDrive.t @@ -3,11 +3,11 @@ use Modern::Perl; use t::lib::Mocks; use Test::More tests => 5; # last test to print -local $@; -eval { require WebService::ILS::OverDrive::Patron; } - or diag($@); +use Module::Load::Conditional qw( can_load ); + SKIP: { - skip "cannot filnd WebService::ILS::OverDrive::Patron", 5 if $@; + skip "cannot filnd WebService::ILS::OverDrive::Patron", 5 + unless can_load( modules => { 'WebService::ILS::OverDrive::Patron' => undef } ); use_ok('Koha::ExternalContent::OverDrive'); -- 2.7.4