[svn:parrot] r42256 - branches/configtests/t/steps/init

jkeenan at svn.parrot.org jkeenan at svn.parrot.org
Thu Nov 5 01:56:07 UTC 2009


Author: jkeenan
Date: Thu Nov  5 01:56:06 2009
New Revision: 42256
URL: https://trac.parrot.org/parrot/changeset/42256

Log:
Continue to convert steps tests to use of Parrot configuration data.

Modified:
   branches/configtests/t/steps/init/headers-01.t

Modified: branches/configtests/t/steps/init/headers-01.t
==============================================================================
--- branches/configtests/t/steps/init/headers-01.t	Thu Nov  5 01:37:08 2009	(r42255)
+++ branches/configtests/t/steps/init/headers-01.t	Thu Nov  5 01:56:06 2009	(r42256)
@@ -13,11 +13,12 @@
 use Tie::File;
 use lib qw( lib );
 use_ok('config::init::headers');
-use Parrot::Configure;
 use Parrot::Configure::Options qw( process_options );
 use Parrot::Configure::Step::Test;
+use Parrot::Configure::Test qw(
+    test_step_constructor_and_description
+);
 
-my $pkg  = q{init::headers};
 my ($args, $step_list_ref) = process_options(
     {
         argv => [],
@@ -28,16 +29,11 @@
 my $conf = Parrot::Configure::Step::Test->new;
 $conf->include_config_results( $args );
 
+my $pkg  = q{init::headers};
 $conf->add_steps($pkg);
 $conf->options->set( %{$args} );
 
-my $task        = $conf->steps->[-1];
-my $step_name   = $task->step;
-
-my $step = $step_name->new();
-ok( defined $step, "$step_name constructor returned defined value" );
-isa_ok( $step, $step_name );
-ok( $step->description(), "$step_name has description" );
+my $step = test_step_constructor_and_description($conf);
 
 my $cwd = cwd();
 {


More information about the parrot-commits mailing list