From: plobbes Date: Sat, 13 Jan 2007 17:19:35 +0000 (+0000) Subject: - skip all tests if 'use Business::OnlinePayment::HTTPS' fails X-Git-Tag: BUSINESS_ONLINEPAYMENT_3_00_06~15 X-Git-Url: http://git.freeside.biz/gitweb/?p=Business-OnlinePayment.git;a=commitdiff_plain;h=8bb144980f6adc14d0e0b8235b1ee5d56e79fe76 - skip all tests if 'use Business::OnlinePayment::HTTPS' fails --- diff --git a/t/bop_https.t b/t/bop_https.t index 533e496..a67f695 100644 --- a/t/bop_https.t +++ b/t/bop_https.t @@ -1,9 +1,21 @@ -# test 1 -BEGIN { $| = 1; print "1..1\n"; } -END {print "not ok 1\n" unless $loaded;} +#!/usr/bin/perl -use Business::OnlinePayment::HTTPS; -$loaded = 1; -print "ok 1\n"; +use strict; +use warnings; +use Test::More; +my $package = "Business::OnlinePayment::HTTPS"; +eval "use $package;"; +# HTTPS support is optional +if ($@) { + plan( skip_all => "$package: $@\n" ); +} +else { + plan( tests => 1 ); +} + +{ + can_ok( $package, qw(https_get https_post) ); + my $obj; +}