From ff86702dd85eab420f6f58e8dcf8375dae4b22b9 Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Sun, 4 May 2014 12:12:41 -0700 Subject: use test helpers --- Library/Formula/libvbucket.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'Library/Formula/libvbucket.rb') diff --git a/Library/Formula/libvbucket.rb b/Library/Formula/libvbucket.rb index 4ca8624f5..c747d6579 100644 --- a/Library/Formula/libvbucket.rb +++ b/Library/Formula/libvbucket.rb @@ -22,7 +22,6 @@ class Libvbucket < Formula test do require 'utils/json' - require 'open3' json = Utils::JSON.dump( { "hashAlgorithm" => "CRC", @@ -37,10 +36,7 @@ class Libvbucket < Formula key: world master: server2:11210 vBucketId: 3 couchApiBase: (null) replicas: server3:11211 server1:11211 EOS - Open3.popen3("#{bin}/vbuckettool", "-", "hello", "world") do |stdin, stdout, _| - stdin.write(json) - stdin.close - assert_equal expected, stdout.read - end + output = pipe_output("#{bin}/vbuckettool - hello world", json) + assert_equal expected, output end end -- cgit v1.2.3