7 use YAML::Any 'LoadFile';
9 use SGN::Build::ChangeLog;
11 my $changes = SGN::Build::ChangeLog->new( releases => 'Changes' );
12 can_ok( $changes, 'releases');
13 # test construction with Path::Class::File objs
14 can_ok( SGN::Build::ChangeLog->new( releases => file('Changes') ), 'releases');
16 cmp_ok( $changes->release_count, '>', 1 , 'Changes file YAML-parses to a bunch of changes' );
19 for my $change ( $changes->releases_list ) {
21 cmp_ok( $last_date, '>', $change->release_date, 'dates are in reverse chronological order' );
23 $last_date = $change->release_date;
24 isa_ok( $change->release_date, 'DateTime' );
25 cmp_ok( scalar( @{$change->changes} ), '>=', 1, 'at least one change in release '.$change->release_date );