From 49d3849507aed7c5ff770376add40ac44963b589 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Tue, 29 Jan 2019 10:48:39 +0000 Subject: [PATCH] cmd/install_spec: test new invalid option behaviour. --- Library/Homebrew/test/cmd/install_spec.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Library/Homebrew/test/cmd/install_spec.rb b/Library/Homebrew/test/cmd/install_spec.rb index f6bcb874a7..78302efcb0 100644 --- a/Library/Homebrew/test/cmd/install_spec.rb +++ b/Library/Homebrew/test/cmd/install_spec.rb @@ -166,12 +166,12 @@ describe "brew install", :integration_test do .and be_a_success end - it "ignores invalid options" do + it "rejects invalid options" do setup_test_formula "testball1" - expect { brew "install", "testball1", "--with-fo" } - .to output(/testball1: this formula has no \-\-with\-fo option so it will be ignored!/).to_stderr - .and output(/Downloading file/).to_stdout - .and be_a_success + expect { brew "install", "testball1", "--invalid" } + .to output(/Error: invalid option: --invalid/).to_stderr + .and not_to_output.to_stdout + .and be_a_failure end it "succeeds when a non-fatal requirement isn't satisfied" do