[Bps-public-commit] r12226 - in Prophet/trunk: .

sartak at bestpractical.com sartak at bestpractical.com
Sat May 10 23:03:58 EDT 2008


Author: sartak
Date: Sat May 10 23:03:57 2008
New Revision: 12226

Modified:
   Prophet/trunk/   (props changed)
   Prophet/trunk/lib/Prophet/Test.pm

Log:
 r55541 at onn:  sartak | 2008-05-10 23:03:40 -0400
 Instead of opening up $EDITOR, allow the test script to specify a editing function


Modified: Prophet/trunk/lib/Prophet/Test.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/Test.pm	(original)
+++ Prophet/trunk/lib/Prophet/Test.pm	Sat May 10 23:03:57 2008
@@ -20,6 +20,15 @@
 Test::More->import;
 diag( "Replicas can be found in" . $REPO_BASE );
 
+our $EDIT_TEXT = sub { shift };
+do {
+    no warnings 'redefine';
+    *Prophet::CLI::Command::edit_text = sub {
+        my $self = shift;
+        $EDIT_TEXT->(@_);
+    };
+};
+
 sub import_extra {
     my $class = shift;
     my $args  = shift;



More information about the Bps-public-commit mailing list