require 'formula' class Wdiff < Formula homepage 'http://www.gnu.org/software/wdiff/' url 'http://ftpmirror.gnu.org/wdiff/wdiff-1.2.2.tar.gz' mirror 'http://ftp.gnu.org/gnu/wdiff/wdiff-1.2.2.tar.gz' sha1 'c93b5cb593257d814212e15fc371ff6c6b952c3d' depends_on 'gettext' => :optional def install system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}", "--enable-experimental" system "make install" end test do a = testpath/"a.txt" a.write "The missing package manager for OS X" b = testpath/"b.txt" b.write "The package manager for OS X" out = `#{bin}/wdiff #{a} #{b}` assert_equal "The [-missing-] package manager for OS X", out assert_equal 1, $?.exitstatus end end