From 95e666eecf08c14076ce19a9629a75a83b11ed57 Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Thu, 13 Jun 2013 08:49:58 -0700 Subject: pgplot: use testpath --- Library/Formula/pgplot.rb | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'Library/Formula/pgplot.rb') diff --git a/Library/Formula/pgplot.rb b/Library/Formula/pgplot.rb index 41419f148..ab8fa74c5 100644 --- a/Library/Formula/pgplot.rb +++ b/Library/Formula/pgplot.rb @@ -103,16 +103,13 @@ EOS end test do - File.open('test_pgplot', 'w') do |t| - t.write(<<-EOS -spawn #{prefix}/examples/pgdemo1 -expect { - NULL {send "/XWINDOW\n"; exp_continue} - RETURN {send "\n"; exp_continue} -} -EOS - ) - end + (testpath/'test_pgplot').write <<-EOS.undent + spawn #{prefix}/examples/pgdemo1 + expect { + NULL {send "/XWINDOW\n"; exp_continue} + RETURN {send "\n"; exp_continue} + } + EOS system "expect test_pgplot; killall pgxwin_server" end end -- cgit v1.2.3