| 1 | package App::Gitc::Test; | ||
| 2 | use strict; | ||
| 3 | use warnings; | ||
| 4 | |||
| 5 | # ABSTRACT: Test class for gitc | ||
| 6 | our $VERSION = '0.60'; # VERSION | ||
| 7 | |||
| 8 | use Test::More ''; | ||
| 9 | use App::Gitc::Util qw( branch_point unpromoted ); | ||
| 10 | use Exporter 'import'; | ||
| 11 | |||
| 12 | BEGIN { | ||
| 13 | our @EXPORT = qw( branch_point_is unpromoted_is ); | ||
| 14 | }; | ||
| 15 | |||
| 16 | sub branch_point_is { | ||
| 17 | my ( $ref, $expected, $message ) = @_; | ||
| 18 | my $sha1 = branch_point($ref); | ||
| 19 | Test::More::is( $sha1, $expected, $message ); | ||
| 20 | } | ||
| 21 | |||
| 22 | sub unpromoted_is { | ||
| 23 | my ( $source, $target, $expected, $message ) = @_; | ||
| 24 | my @changesets = unpromoted( $source, $target ); | ||
| 25 | Test::More::is_deeply(\@changesets, $expected, $message); | ||
| 26 | } | ||
| 27 | |||
| 28 | 1; | ||
| 29 | |||
| 30 | __END__ |