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/jsonpp.rb | |
| parent | 1dc876667538fb33ebc9eb30edd3bc9b530592a6 (diff) | |
| download | homebrew-ff86702dd85eab420f6f58e8dcf8375dae4b22b9.tar.bz2 | |
use test helpers
Diffstat (limited to 'Library/Formula/jsonpp.rb')
| -rw-r--r-- | Library/Formula/jsonpp.rb | 17 | 
1 files changed, 7 insertions, 10 deletions
| diff --git a/Library/Formula/jsonpp.rb b/Library/Formula/jsonpp.rb index 4cdbf632d..0c00153fe 100644 --- a/Library/Formula/jsonpp.rb +++ b/Library/Formula/jsonpp.rb @@ -11,15 +11,12 @@ class Jsonpp < Formula    end    test do -    IO.popen("#{bin}/jsonpp", "w+") do |pipe| -      pipe.puts '{"foo":"bar","baz":"qux"}' -      pipe.close_write -      assert_equal <<-EOS.undent, pipe.read -        { -          "foo": "bar", -          "baz": "qux" -        } -      EOS -    end +    expected = <<-EOS.undent.chomp +      { +        "foo": "bar", +        "baz": "qux" +      } +    EOS +    assert_equal expected, pipe_output(bin/"jsonpp", '{"foo":"bar","baz":"qux"}')    end  end | 
