From 6d91ad98de6c170239f7b032e78f7657865b1825 Mon Sep 17 00:00:00 2001 From: Kent Fredric Date: Mon, 11 Jul 2011 16:54:48 +1200 Subject: [PATCH 1/2] rehash minting test and add more test steps --- Changes | 5 +++++ corpus/git_config.ini | 3 --- t/01-Minter.t | 32 +++++++++++++++++++++++++++----- 3 files changed, 32 insertions(+), 8 deletions(-) delete mode 100644 corpus/git_config.ini diff --git a/Changes b/Changes index 7a7de5ca..90f1189c 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,11 @@ Revision history for {{$dist->name}} {{$NEXT}} + [Tests] + - Redo the git hack using ENV flags instead of a config file as it still + doesn't work as intended. Need both AUTHOR and CONFIG env variables. + - Minting test now more detailed with arbitrary pass indicators to + indicate where fails occur. 1.0.10 2011-07-11T03:41:19Z [Packaging] diff --git a/corpus/git_config.ini b/corpus/git_config.ini deleted file mode 100644 index d7b97ef0..00000000 --- a/corpus/git_config.ini +++ /dev/null @@ -1,3 +0,0 @@ -[user] -name = Anon Y. Mus -email = anonymus@example.org diff --git a/t/01-Minter.t b/t/01-Minter.t index 2c571e01..da07a865 100644 --- a/t/01-Minter.t +++ b/t/01-Minter.t @@ -15,21 +15,34 @@ BEGIN { $global = $corpus->subdir('global'); } -local $ENV{'GIT_CONFIG'} = $corpus->file('git_config.ini')->stringify; +$ENV{'GIT_AUTHOR_NAME'} = $ENV{'GIT_COMMITTER_NAME'} = 'Anon Y. Mus'; +$ENV{'GIT_AUTHOR_EMAIL'} = $ENV{'GIT_COMMITTER_EMAIL'} = 'anonymus@example.org'; use Test::File::ShareDir -share => { -module => { 'Dist::Zilla::MintingProfile::Author::KENTNL' => $root->subdir('share')->subdir('profiles') }, }; use Test::DZil; -my $tzil = - Minter->_new_from_profile( [ 'Author::KENTNL' => 'default' ], { name => 'DZT-Minty', }, { global_config_root => $global }, ); -$tzil->chrome->logger->set_debug(1); -$tzil->mint_dist; +my $tzil; + subtest 'mint files' => sub { + $tzil = Minter->_new_from_profile( [ 'Author::KENTNL' => 'default' ], { name => 'DZT-Minty', }, { global_config_root => $global }, ); + + pass('Loaded minter config'); + + $tzil->chrome->logger->set_debug(1); + + pass("set debug"); + + $tzil->mint_dist; + + pass("minted dist"); + my $pm = $tzil->slurp_file('mint/lib/DZT/Minty.pm'); + pass('slurped file'); + my %expected_files = map { $_ => 1 } qw( lib/DZT/Minty.pm weaver.ini @@ -69,11 +82,20 @@ subtest 'build minting' => sub { my $tmpdir = $tzil->tempdir->subdir('mint')->absolute; + pass("Got minted dir"); + my $bzil = Builder->from_config( { dist_root => $tmpdir }, {}, { global_config_root => $global }, ); + + pass("Loaded builder configuration"); + $bzil->chrome->logger->set_debug(1); + pass("Set debug"); + $bzil->build; + pass("Built Dist"); + # NOTE: ->test doesn't work atm due to various reasons unknown, so doing it manually. my $exception; From 186793008d2eabe8f41292ffc1b41adcf70eb465 Mon Sep 17 00:00:00 2001 From: Kent Fredric Date: Mon, 11 Jul 2011 16:57:18 +1200 Subject: [PATCH 2/2] v1.0.11 [Tests] - Redo the git hack using ENV flags instead of a config file as it still doesn't work as intended. Need both AUTHOR and CONFIG env variables. - Minting test now more detailed with arbitrary pass indicators to indicate where fails occur. --- Changes | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Changes b/Changes index 90f1189c..b71fd232 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,8 @@ Revision history for {{$dist->name}} {{$NEXT}} + +1.0.11 2011-07-11T04:56:38Z [Tests] - Redo the git hack using ENV flags instead of a config file as it still doesn't work as intended. Need both AUTHOR and CONFIG env variables.