From fbfc9b14bcfc74bd40df5f7dff73efd1db771aa6 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Tue, 26 Mar 2013 10:42:04 -0500 Subject: unac: improve test --- Library/Formula/unac.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Library') diff --git a/Library/Formula/unac.rb b/Library/Formula/unac.rb index e1c2f4a00..db7acc32f 100644 --- a/Library/Formula/unac.rb +++ b/Library/Formula/unac.rb @@ -40,8 +40,11 @@ class Unac < Formula system "make install" end - def test - `#{bin}/unaccent utf-8 fóó`.chomp == 'foo' + test do + require 'open3' + Open3.popen3("#{bin}/unaccent", "utf-8", "fóó") do |_, stdout, _| + "foo" == stdout.read.strip + end end end -- cgit v1.2.3