test_utils: remove unnecessary full paths.

This commit is contained in:
Mike McQuaid 2016-07-27 21:50:43 -06:00
parent b999edb344
commit 1aded31fec

View File

@ -161,13 +161,13 @@ class UtilTests < Homebrew::TestCase
end end
def test_popen_read def test_popen_read
out = Utils.popen_read("/bin/sh", "-c", "echo success").chomp out = Utils.popen_read("sh", "-c", "echo success").chomp
assert_equal "success", out assert_equal "success", out
assert_predicate $?, :success? assert_predicate $?, :success?
end end
def test_popen_read_with_block def test_popen_read_with_block
out = Utils.popen_read("/bin/sh", "-c", "echo success") do |pipe| out = Utils.popen_read("sh", "-c", "echo success") do |pipe|
pipe.read.chomp pipe.read.chomp
end end
assert_equal "success", out assert_equal "success", out
@ -175,7 +175,7 @@ class UtilTests < Homebrew::TestCase
end end
def test_popen_write_with_block def test_popen_write_with_block
Utils.popen_write("/usr/bin/grep", "-q", "success") do |pipe| Utils.popen_write("grep", "-q", "success") do |pipe|
pipe.write("success\n") pipe.write("success\n")
end end
assert_predicate $?, :success? assert_predicate $?, :success?