[Rt-commit] r13761 - in rt/3.8/trunk: t/web

spang at bestpractical.com spang at bestpractical.com
Thu Jul 3 07:15:02 EDT 2008


Author: spang
Date: Thu Jul  3 07:15:01 2008
New Revision: 13761

Modified:
   rt/3.8/trunk/   (props changed)
   rt/3.8/trunk/t/web/command_line.t

Log:
 r43556 at loki:  spang | 2008-07-03 10:37:48 +0100
 make command_line.t use relative paths to find test data


Modified: rt/3.8/trunk/t/web/command_line.t
==============================================================================
--- rt/3.8/trunk/t/web/command_line.t	(original)
+++ rt/3.8/trunk/t/web/command_line.t	Thu Jul  3 07:15:01 2008
@@ -1,6 +1,7 @@
 #!/usr/bin/perl -w
 
 use strict;
+use File::Spec;
 use Test::Expect;
 use Test::More tests => 241;
 use RT::Test;
@@ -108,9 +109,16 @@
     expect_like(qr/Message recorded/, "Added the correspondence");
     ### should test to make sure it actually got added
 
+    # figure out the path to the test data
+    (my $volume, my $directories, my $file) = File::Spec->splitpath($0);
+    my $datadir = File::Spec->catdir(File::Spec->curdir(), $directories,
+        File::Spec->updir(), "data");
+    my $test_email = File::Spec->catfile(
+        File::Spec->catdir($datadir, "emails"), "lorem-ipsum");
+
     # add attachments to a ticket
     # text attachment
-    check_attachment("t/data/emails/lorem-ipsum");
+    check_attachment($test_email);
     # binary attachment
     check_attachment($RT::MasonComponentRoot.'/NoAuth/images/bplogo.gif');
 


More information about the Rt-commit mailing list