diff options
| author | Mike McQuaid | 2017-12-03 09:23:01 +0000 |
|---|---|---|
| committer | GitHub | 2017-12-03 09:23:01 +0000 |
| commit | 0d53831b902e2c9df5e6540822d1a8fd4672577d (patch) | |
| tree | f3cfadc93d7b6ca0e24877cc4e23cf3f93235120 /Library/Homebrew/test | |
| parent | d0e893fab69957b7ab170cfcc2db6a8f95e3ebac (diff) | |
| parent | 7adee6d62fabae0244d611069f09ab906a459805 (diff) | |
| download | brew-0d53831b902e2c9df5e6540822d1a8fd4672577d.tar.bz2 | |
Merge pull request #3515 from sjackman/popen
Utils.popen_read: Nonexistent program should fail
Diffstat (limited to 'Library/Homebrew/test')
| -rw-r--r-- | Library/Homebrew/test/utils/popen_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Library/Homebrew/test/utils/popen_spec.rb b/Library/Homebrew/test/utils/popen_spec.rb index 63bbc7b18..d1ae12d1c 100644 --- a/Library/Homebrew/test/utils/popen_spec.rb +++ b/Library/Homebrew/test/utils/popen_spec.rb @@ -15,6 +15,12 @@ describe Utils do ).to eq("success") expect($CHILD_STATUS).to be_a_success end + + it "fails when the command does not exist" do + expect(subject.popen_read("./nonexistent", err: :out)) + .to eq("brew: command not found: ./nonexistent\n") + expect($CHILD_STATUS).to be_a_failure + end end describe "::popen_write" do |
