aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test
diff options
context:
space:
mode:
authorMike McQuaid2017-12-29 15:53:39 +0000
committerGitHub2017-12-29 15:53:39 +0000
commitc6eaa73db1336b3daa2f9b1cb9962d2b9e7c8922 (patch)
tree7a71742bf30858583afab7a997646d62c53cc797 /Library/Homebrew/test
parentc2e1b3cccff1056248bdc231c13ff3d2c9f572ff (diff)
parent78fe082a2b85f097dae7b8333ba66a8fd31ca2d0 (diff)
downloadbrew-c6eaa73db1336b3daa2f9b1cb9962d2b9e7c8922.tar.bz2
Merge pull request #3604 from alyssais/cask_no_arguments
cask: exit successfully when given no arguments.
Diffstat (limited to 'Library/Homebrew/test')
-rw-r--r--Library/Homebrew/test/cask/cli_spec.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/Library/Homebrew/test/cask/cli_spec.rb b/Library/Homebrew/test/cask/cli_spec.rb
index 4a61e0088..f88af4188 100644
--- a/Library/Homebrew/test/cask/cli_spec.rb
+++ b/Library/Homebrew/test/cask/cli_spec.rb
@@ -16,10 +16,16 @@ describe Hbc::CLI, :cask do
it "ignores the `--language` option, which is handled in `OS::Mac`" do
cli = described_class.new("--language=en")
expect(cli).to receive(:detect_command_and_arguments).with(no_args)
- expect(cli).to receive(:exit).with(1)
cli.run
end
+ context "when given no arguments" do
+ it "exits successfully" do
+ expect(subject).not_to receive(:exit).with(be_nonzero)
+ subject.run
+ end
+ end
+
context "when no option is specified" do
it "--binaries is true by default" do
command = Hbc::CLI::Install.new("some-cask")