diff --git a/tiv.rb b/tiv.rb index b7ae8e9..6d0b8f9 100644 --- a/tiv.rb +++ b/tiv.rb @@ -4,7 +4,7 @@ class Tiv < Formula url "https://github.com/stefanhaustein/TerminalImageViewer/archive/v1.1.0.tar.gz" sha256 "727ddaa048643cb0a13e23bc308415060d99d8b1853883ad339ad7b952050d61" head "https://github.com/stefanhaustein/TerminalImageViewer.git" - depends_on "gcc" => :build unless OS.linux? + uses_from_macos "curl" => :test depends_on "imagemagick" def install @@ -24,7 +24,9 @@ class Tiv < Formula test do # Downloads a public domain test file from wikimedia commons and displays it. # NOTE: Test will fail. Will fix when I get to my mac. - assert_equal "", - shell_output("#{bin}/tiv -0 -w 400 -h 400 https://upload.wikimedia.org/wikipedia/commons/2/24/Cornell_box.png").strip + system "curl -o \"test.png\" https://upload.wikimedia.org/wikipedia/commons/2/24/Cornell_box.png" + assert_equal "â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„ +", + shell_output("#{bin}/tiv -0 -w 400 -h 400 test.png").strip end end