diff --git a/t/db_dependent/TagsExternalDictionary.t b/t/db_dependent/TagsExternalDictionary.t index 65ca70429a..c17fbe37b1 100755 --- a/t/db_dependent/TagsExternalDictionary.t +++ b/t/db_dependent/TagsExternalDictionary.t @@ -3,7 +3,8 @@ use Modern::Perl; use Test::NoWarnings; -use Test::More tests => 3; +use Test::More tests => 2; +use Test::Exception; use C4::Context; @@ -11,22 +12,7 @@ my $original = C4::Context->preference('TagsExternalDictionary'); C4::Context->set_preference( 'TagsExternalDictionary', '/usr/bin/ispell' ); -my $output = qx{ - perl -I. -MC4::Tags -e 'print "loaded\n"' 2>&1 -}; -my $exit_status = $? >> 8; +lives_ok { require C4::Tags } 'C4::Tags compiles when TagsExternalDictionary is configured'; -# Restore the original preference before checking the result +# Restore the original preference C4::Context->set_preference( 'TagsExternalDictionary', $original // q{} ); - -is( - $exit_status, - 0, - 'C4::Tags loads when TagsExternalDictionary is configured' -); - -like( - $output, - qr/loaded/, - 'C4::Tags finished loading successfully' -);