diff options
| author | Adam Vandenberg | 2014-05-04 12:12:41 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2014-08-01 07:58:10 -0700 |
| commit | ff86702dd85eab420f6f58e8dcf8375dae4b22b9 (patch) | |
| tree | e0071c9d3604ab8d311679aa77ce9cce90da962f /Library/Formula/newick-utils.rb | |
| parent | 1dc876667538fb33ebc9eb30edd3bc9b530592a6 (diff) | |
| download | homebrew-ff86702dd85eab420f6f58e8dcf8375dae4b22b9.tar.bz2 | |
use test helpers
Diffstat (limited to 'Library/Formula/newick-utils.rb')
| -rw-r--r-- | Library/Formula/newick-utils.rb | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/Library/Formula/newick-utils.rb b/Library/Formula/newick-utils.rb index 93d5a3277..6bc895413 100644 --- a/Library/Formula/newick-utils.rb +++ b/Library/Formula/newick-utils.rb @@ -17,8 +17,6 @@ class NewickUtils < Formula end test do - require 'open3' - expected = <<-EOS +-------------------------------------+ B =| A @@ -29,11 +27,8 @@ class NewickUtils < Formula substitutions/site EOS - Open3.popen3("#{bin}/nw_display", "-") do |stdin, stdout, _| - stdin.write("(B:1,C:2)A;\n") - stdin.close - assert_equal expected, stdout.read.split("\n").map(&:rstrip).join("\n") - end + output = pipe_output("#{bin}/nw_display -", "(B:1,C:2)A;\n") + assert_equal expected, output.split("\n").map(&:rstrip).join("\n") end end |
