[Bps-public-commit] r16546 - in sd/trunk: .

spang at bestpractical.com spang at bestpractical.com
Sun Oct 26 17:09:06 EDT 2008


Author: spang
Date: Sun Oct 26 17:09:05 2008
New Revision: 16546

Modified:
   sd/trunk/   (props changed)
   sd/trunk/lib/App/SD/Test.pm

Log:
 r50905 at loki:  spang | 2008-10-26 13:06:54 -0400
 helper function for writing data to a file, and use SD_CONFIG rather than PROPHET_APP_CONFIG


Modified: sd/trunk/lib/App/SD/Test.pm
==============================================================================
--- sd/trunk/lib/App/SD/Test.pm	(original)
+++ sd/trunk/lib/App/SD/Test.pm	Sun Oct 26 17:09:05 2008
@@ -9,8 +9,8 @@
 use Cwd qw/getcwd/;
 use base qw/Exporter/;
 our @EXPORT = qw(create_ticket_ok create_ticket_comment_ok get_uuid_for_luid get_luid_for_uuid);
-$ENV{'EMAIL'} = "someone\@example.com";
-$ENV{'PROPHET_APP_CONFIG'} = "t/prophet_testing.conf";
+$ENV{'SD_CONFIG'} = 't/prophet_testing.conf';
+$ENV{'PROPHET_APP_CONFIG'} = undef;
 
 =head2 create_ticket_ok ARGS
 
@@ -168,3 +168,20 @@
     $ENV{'EDITOR'} = File::Spec->catfile(getcwd(), 't', 'scripts', $script);
     diag 'export EDITOR=' . $ENV{'EDITOR'} . "\n";
 }
+
+=head2 write_to_file FILENAME DATA
+
+Takes the string given in DATA and writes it to the file whose name is given
+by FILENAME.
+
+=cut
+
+sub write_to_file {
+    my ($self, $filename, $data) = @_;
+
+    open FH, '>', $filename;
+    print FH $data;
+    close FH;
+}
+
+1;



More information about the Bps-public-commit mailing list