[Rt-commit] r7874 - in rtfm/branches/2.1-TESTING: .

ruz at bestpractical.com ruz at bestpractical.com
Tue May 15 20:05:49 EDT 2007


Author: ruz
Date: Tue May 15 20:05:45 2007
New Revision: 7874

Modified:
   rtfm/branches/2.1-TESTING/   (props changed)
   rtfm/branches/2.1-TESTING/t/ArticleCollection_Overlay.pm.t
   rtfm/branches/2.1-TESTING/t/Article_Overlay.pm.t
   rtfm/branches/2.1-TESTING/t/Class_Overlay.pm.t
   rtfm/branches/2.1-TESTING/t/System.pm.t
   rtfm/branches/2.1-TESTING/t/URI__a.pm.t

Log:
 r324 at cubic-pc:  cubic | 2007-05-16 03:40:43 +0400
 * now all tests work without setting libs via tricks


Modified: rtfm/branches/2.1-TESTING/t/ArticleCollection_Overlay.pm.t
==============================================================================
--- rtfm/branches/2.1-TESTING/t/ArticleCollection_Overlay.pm.t	(original)
+++ rtfm/branches/2.1-TESTING/t/ArticleCollection_Overlay.pm.t	Tue May 15 20:05:45 2007
@@ -1,12 +1,18 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
+
+use strict;
+use warnings;
 
 use Test::More qw/no_plan/;
-use_ok(RT);
+BEGIN { require 't/utils.pl' }
+
+use_ok 'RT';
 RT::LoadConfig();
 RT::Init();
 
-use_ok(RT::FM::ArticleCollection);
-use_ok(RT::FM::ClassCollection);
+use_ok 'RT::FM::ArticleCollection';
+use_ok 'RT::FM::ClassCollection';
+use_ok 'RT::FM::Class';
 
 my $class = RT::FM::Class->new($RT::SystemUser);
 my ( $id, $msg ) = $class->Create( Name => 'CollectionTest-' . $$ );

Modified: rtfm/branches/2.1-TESTING/t/Article_Overlay.pm.t
==============================================================================
--- rtfm/branches/2.1-TESTING/t/Article_Overlay.pm.t	(original)
+++ rtfm/branches/2.1-TESTING/t/Article_Overlay.pm.t	Tue May 15 20:05:45 2007
@@ -1,14 +1,18 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
+
+use strict;
+use warnings;
 
 use Test::More 'no_plan';
+BEGIN { require 't/utils.pl' }
 
-use_ok(RT);
+use_ok 'RT';
 RT::LoadConfig();
 RT::Init();
 
-use_ok(RT::FM::Article);
-use_ok(RT::FM::ArticleCollection);
-use_ok(RT::FM::Class);
+use_ok 'RT::FM::ArticleCollection';
+use_ok 'RT::FM::ClassCollection';
+use_ok 'RT::FM::Class';
 
 my $CLASS = 'ArticleTest-'.$$;
 
@@ -103,7 +107,7 @@
 my $refers_to_b = $article_b->ReferredToBy;
 ok($refers_to_b->Count == 1, "Found one thing referring to b");
 my $first = $refers_to_b->First;
-ok ($first->isa(RT::Link), "IT's an RT link - ref ".ref($first) );
+ok ($first->isa('RT::Link'), "IT's an RT link - ref ".ref($first) );
 ok ($first->TargetObj->Id == $article_b->Id, "Its target is B");
 
 ok($refers_to_b->First->BaseObj->isa('RT::FM::Article'), "Yep. its an article");
@@ -113,7 +117,7 @@
 my $referred_To_by_a = $article_a->RefersTo;
 ok($referred_To_by_a->Count == 1, "Found one thing referring to b ".$referred_To_by_a->Count. "-".$referred_To_by_a->First->id . " - ".$referred_To_by_a->Last->id);
  $first = $referred_To_by_a->First;
-ok ($first->isa(RT::Link), "IT's an RT link - ref ".ref($first) );
+ok ($first->isa('RT::Link'), "IT's an RT link - ref ".ref($first) );
 ok ($first->TargetObj->Id == $article_b->Id, "Its target is B - " . $first->TargetObj->Id);
 ok ($first->BaseObj->Id == $article_a->Id, "Its base is A");
 

Modified: rtfm/branches/2.1-TESTING/t/Class_Overlay.pm.t
==============================================================================
--- rtfm/branches/2.1-TESTING/t/Class_Overlay.pm.t	(original)
+++ rtfm/branches/2.1-TESTING/t/Class_Overlay.pm.t	Tue May 15 20:05:45 2007
@@ -1,11 +1,18 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
+
+use strict;
+use warnings;
 
 use Test::More 'no_plan';
+BEGIN { require 't/utils.pl' }
 
-use_ok('RT');
+use_ok 'RT';
 RT::LoadConfig();
 RT::Init();
-use_ok(RT::FM::Class);
+
+use_ok 'RT::FM::ArticleCollection';
+use_ok 'RT::FM::ClassCollection';
+use_ok 'RT::FM::Class';
 
 $RT::SystemUser || die ;# just shut up the warning
 $RT::FM::System || die; # just shut up the warning;

Modified: rtfm/branches/2.1-TESTING/t/System.pm.t
==============================================================================
--- rtfm/branches/2.1-TESTING/t/System.pm.t	(original)
+++ rtfm/branches/2.1-TESTING/t/System.pm.t	Tue May 15 20:05:45 2007
@@ -1,6 +1,10 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
+
+use strict;
+use warnings;
 
 use Test::More 'no_plan';
+BEGIN { require 't/utils.pl' }
 
 use_ok( 'RT::FM::System');
 my $sys = RT::FM::System->new();

Modified: rtfm/branches/2.1-TESTING/t/URI__a.pm.t
==============================================================================
--- rtfm/branches/2.1-TESTING/t/URI__a.pm.t	(original)
+++ rtfm/branches/2.1-TESTING/t/URI__a.pm.t	Tue May 15 20:05:45 2007
@@ -1,8 +1,12 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
+
+use strict;
+use warnings;
 
 use Test::More 'no_plan';
+BEGIN { require 't/utils.pl' }
 
-use_ok(RT);
+use_ok 'RT';
 RT::LoadConfig();
 RT::Init();
 


More information about the Rt-commit mailing list