Blame t/basic.t

Packit 9002b2
use strict;
Packit 9002b2
use warnings;
Packit 9002b2
Packit 9002b2
use Test::More 0.88;
Packit 9002b2
Packit 9002b2
use DateTime::Format::Builder;
Packit 9002b2
Packit 9002b2
# Does new() work properly?
Packit 9002b2
{
Packit 9002b2
    eval { DateTime::Format::Builder->new('fnar') };
Packit 9002b2
    ok( ( $@ and $@ =~ /takes no param/ ), "Too many parameters exception" );
Packit 9002b2
Packit 9002b2
    my $obj = eval { DateTime::Format::Builder->new() };
Packit 9002b2
    ok( !$@, "Created object" );
Packit 9002b2
    isa_ok( $obj, 'DateTime::Format::Builder' );
Packit 9002b2
Packit 9002b2
    eval { $obj->parse_datetime("whenever") };
Packit 9002b2
    ok( ( $@ and $@ =~ /No parser/ ), "No parser exception" );
Packit 9002b2
Packit 9002b2
}
Packit 9002b2
Packit 9002b2
done_testing();