From 1faa4448bd0d77898cb093bfe86b9dcff92f229c Mon Sep 17 00:00:00 2001 From: danielnachun Date: Sat, 5 Mar 2022 19:24:55 -0800 Subject: [PATCH] test/keg_relocate/grep_spec.rb: update unit test --- Library/Homebrew/test/keg_relocate/grep_spec.rb | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Library/Homebrew/test/keg_relocate/grep_spec.rb b/Library/Homebrew/test/keg_relocate/grep_spec.rb index 993fa4b875..889ed7904c 100644 --- a/Library/Homebrew/test/keg_relocate/grep_spec.rb +++ b/Library/Homebrew/test/keg_relocate/grep_spec.rb @@ -43,16 +43,15 @@ describe Keg do end end - describe "#each_unique_binary_file" do - specify "find null bytes in binaries" do + describe "#binary_file?" do + specify "test if file has null bytes" do setup_binary_file - binary_matches = Set.new - keg.each_unique_binary_file do |file| - binary_matches << file - end + expect(keg.binary_file?(binary_file)).to be true - expect(binary_matches.size).to eq 1 + setup_text_file + + expect(keg.binary_file?(text_file)).to be false end end end