Skip to content

Commit

Permalink
hack Net::Trac::TestHarness to customize trac.ini
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnavy committed Dec 13, 2010
1 parent 6af5742 commit f55d5aa
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions t/setup_trac.pl
Expand Up @@ -17,14 +17,26 @@ sub new {
return $self;
}

sub start_test_server {
my $self = shift;
sub init_test_server {
my $self = shift;
$self->port( int( 60000 + rand(2000) ) );
$self->dir( tempdir( CLEANUP => 1 ) );
$self->init;

if (@_) {
open my $fh, '>>',
File::Spec->catfile( $self->dir, 'trac', 'conf', 'trac.ini' )
or die $!;
print $fh @_;
}
return 1;
}

$self->port( int(60000 + rand(2000)));
$self->dir(tempdir( CLEANUP => 1));
$self->init;
$self->daemonize;
return $self->_did_server_start;
sub start_test_server {
my $self = shift;
$self->init_test_server(@_);
$self->daemonize;
return $self->_did_server_start;
}

sub _did_server_start {
Expand Down

0 comments on commit f55d5aa

Please sign in to comment.