[Bps-public-commit] r10748 - in Shipwright/t: hello

sunnavy at bestpractical.com sunnavy at bestpractical.com
Wed Feb 6 20:10:33 EST 2008


Author: sunnavy
Date: Wed Feb  6 20:10:32 2008
New Revision: 10748

Removed:
   Shipwright/t/hello/config.t
   Shipwright/t/hello/config.yml
   Shipwright/t/hello/svn.yml
Modified:
   Shipwright/t/00.load.t
   Shipwright/t/hello/hello.t
   Shipwright/t/hello/svn.t

Log:
updated tests

Modified: Shipwright/t/00.load.t
==============================================================================
--- Shipwright/t/00.load.t	(original)
+++ Shipwright/t/00.load.t	Wed Feb  6 20:10:32 2008
@@ -1,11 +1,11 @@
-use Test::More tests => 16;
+use Test::More tests => 17;
 
 BEGIN {
     use_ok('Shipwright');
-    use_ok('Shipwright::Config');
     use_ok('Shipwright::Build');
     use_ok('Shipwright::Backend');
     use_ok('Shipwright::Backend::SVK');
+    use_ok('Shipwright::Logger');
     use_ok('Shipwright::Source');
     use_ok('Shipwright::Source::Compressed');
     use_ok('Shipwright::Source::CPAN');
@@ -17,6 +17,7 @@
     use_ok('Shipwright::Script::Import');
     use_ok('Shipwright::Script::Export');
     use_ok('Shipwright::Script::Build');
+    use_ok('Shipwright::Util');
 }
 
 diag("Testing Shipwright $Shipwright::VERSION");

Modified: Shipwright/t/hello/hello.t
==============================================================================
--- Shipwright/t/hello/hello.t	(original)
+++ Shipwright/t/hello/hello.t	Wed Feb  6 20:10:32 2008
@@ -8,9 +8,9 @@
 use File::Spec;
 use Cwd;
 
-use Test::More tests => 41;
+use Test::More tests => 40;
 SKIP: {
-    skip "can't find svn in PATH", 41,
+    skip "can't find svk in PATH", 40,
       unless `whereis svk`;
 
     my $cwd  = getcwd;
@@ -29,28 +29,28 @@
 
     for ( keys %source ) {
         my $shipwright = Shipwright->new(
-            config => File::Spec->catfile( 't', 'hello', 'config.yml' ),
-            name   => 'hello',
-            source => $_,
+            repository => "svk:$repo",
+            source     => $_,
+            log_level  => 'FATAL',
         );
         isa_ok( $shipwright, 'Shipwright' );
         isa_ok( $shipwright->source, "Shipwright::Source::$source{$_}" );
     }
 
     my $shipwright = Shipwright->new(
-        config => File::Spec->catfile( 't', 'hello', 'config.yml' ),
-        name   => 'hello',
+        repository => "svk:$repo",
         source => File::Spec->catfile( 't', 'hello', 'Acme-Hello-0.03.tar.gz' ),
+        follow => 0,
+        log_level => 'FATAL',
     );
 
     isa_ok( $shipwright,          'Shipwright' );
-    isa_ok( $shipwright->config,  'Shipwright::Config' );
     isa_ok( $shipwright->backend, 'Shipwright::Backend::SVK' );
     isa_ok( $shipwright->source,  'Shipwright::Source::Compressed' );
     isa_ok( $shipwright->build,   'Shipwright::Build' );
 
     # init
-    $shipwright->backend->initialize( name => 'hello' );
+    $shipwright->backend->initialize();
     my @dirs = sort `svk ls $repo`;
     chomp @dirs;
     is_deeply(
@@ -136,10 +136,11 @@
 
     chdir $cwd;
     $shipwright = Shipwright->new(
-        config => File::Spec->catfile( 't', 'hello', 'config.yml' ),
-        name   => 'hello',
+        repository => "svk:$repo",
         source => File::Spec->catfile( 't', 'hello', 'Acme-Hello-0.03.tar.gz' ),
-        source_name => 'howdy',
+        name   => 'howdy',
+        follow => 0,
+        log_level => 'FATAL',
     );
 
     $source_dir = $shipwright->source->run();

Modified: Shipwright/t/hello/svn.t
==============================================================================
--- Shipwright/t/hello/svn.t	(original)
+++ Shipwright/t/hello/svn.t	Wed Feb  6 20:10:32 2008
@@ -21,15 +21,15 @@
       && die "create repo failed: $!";
 
     my $shipwright = Shipwright->new(
-        config => File::Spec->catfile( 't', 'hello', 'svn.yml' ),
-        name   => 'hello',
+        repository => "svn:$repo",
         source => File::Spec->catfile( 't', 'hello', 'Acme-Hello-0.03.tar.gz' ),
+        log_level => 'FATAL',
     );
 
     isa_ok( $shipwright->backend, 'Shipwright::Backend::SVN' );
 
     # init
-    $shipwright->backend->initialize( name => 'hello' );
+    $shipwright->backend->initialize();
     my @dirs = sort `svn ls $repo`;
     chomp @dirs;
     is_deeply(
@@ -55,6 +55,8 @@
         name         => 'hello',
         source       => $source_dir,
         build_script => $script_dir,
+        follow       => 0,
+        log_level => 'FATAL',
     );
     ok( grep( {/Build\.PL/} `svn cat $repo/scripts/Acme-Hello/build` ),
         'build script ok' );
@@ -104,10 +106,11 @@
 
     chdir $cwd;
     $shipwright = Shipwright->new(
-        config => File::Spec->catfile( 't', 'hello', 'svn.yml' ),
-        name   => 'hello',
+        repository => "svn:$repo",
         source => File::Spec->catfile( 't', 'hello', 'Acme-Hello-0.03.tar.gz' ),
-        source_name => 'howdy',
+        name   => 'howdy',
+        follow => 0,
+        log_level => 'FATAL',
     );
 
     $source_dir = $shipwright->source->run();



More information about the Bps-public-commit mailing list