[Rt-commit] r7151 - in rt/branches/3.7-EXPERIMENTAL-TUNIS: lib/RT
clkao at bestpractical.com
clkao at bestpractical.com
Mon Mar 5 10:24:58 EST 2007
Author: clkao
Date: Mon Mar 5 10:24:58 2007
New Revision: 7151
Modified:
rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/Test.pm
rt/branches/3.7-EXPERIMENTAL-TUNIS/t/mail/crypt-gnupg.t
rt/branches/3.7-EXPERIMENTAL-TUNIS/t/mail/mime_decoding.t
rt/branches/3.7-EXPERIMENTAL-TUNIS/t/mail/sendmail.t
Log:
use RT::Test "nodata"; for not wanting initialdata
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/Test.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/Test.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/Test.pm Mon Mar 5 10:24:58 2007
@@ -35,13 +35,14 @@
sub import {
my $class = shift;
require RT::Handle;
- unless ( ($_[0] || '') eq 'nodb' ) {
- RT::Handle->drop_db( undef, { force => 1 } );
- RT::Handle->create_db;
+ RT::Handle->drop_db( undef, { force => 1 } );
+ RT::Handle->create_db;
- RT->ConnectToDatabase;
- $RT::Handle->insert_schema($dbh);
- $RT::Handle->insert_initial_data();
+ RT->ConnectToDatabase;
+ $RT::Handle->insert_schema($dbh);
+ $RT::Handle->insert_initial_data();
+
+ unless ( ($_[0] || '') eq 'nodata' ) {
$RT::Handle->insert_data( $RT::EtcPath . "/initialdata" );
}
RT::Init;
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/t/mail/crypt-gnupg.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/t/mail/crypt-gnupg.t (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/t/mail/crypt-gnupg.t Mon Mar 5 10:24:58 2007
@@ -4,18 +4,13 @@
use Test::More;
eval 'use GnuPG::Interface; 1' or plan skip_all => 'GnuPG required.';
-plan tests => 95;
+plan tests => 94;
+use RT::Test 'nodata';
-use_ok("RT");
-
-RT::LoadConfig();
RT->Config->Set( LogToScreen => 'debug' );
RT->Config->Set( LogStackTraces => 'error' );
use Data::Dumper;
-RT::Init();
-
-
use File::Spec ();
use Cwd;
my $homedir = File::Spec->catdir( cwd(), qw(lib t data crypt-gnupg) );
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/t/mail/mime_decoding.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/t/mail/mime_decoding.t (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/t/mail/mime_decoding.t Mon Mar 5 10:24:58 2007
@@ -1,12 +1,8 @@
#!/usr/bin/perl
use strict;
use warnings;
-use Test::More tests => 6;
-
-use_ok("RT");
-
-RT::LoadConfig();
-RT::Init();
+use Test::More tests => 5;
+use RT::Test 'nodata';
use_ok('RT::I18N');
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/t/mail/sendmail.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/t/mail/sendmail.t (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/t/mail/sendmail.t Mon Mar 5 10:24:58 2007
@@ -3,9 +3,7 @@
use strict;
use Test::More tests => 143;
-use RT;
-RT::LoadConfig();
-RT::Init();
+use RT::Test 'nodata';
use RT::EmailParser;
use RT::Tickets;
More information about the Rt-commit
mailing list