From d96ad81cd02e2cad1ba022e979e8fb83f0d431e7 Mon Sep 17 00:00:00 2001 From: William Ma Date: Sat, 10 Oct 2020 16:46:22 -0400 Subject: [PATCH] cmd/info: Add test for --json=v2 --- Library/Homebrew/test/cmd/info_spec.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Library/Homebrew/test/cmd/info_spec.rb b/Library/Homebrew/test/cmd/info_spec.rb index 668548fb7f..5839191c46 100644 --- a/Library/Homebrew/test/cmd/info_spec.rb +++ b/Library/Homebrew/test/cmd/info_spec.rb @@ -17,6 +17,15 @@ describe "brew info", :integration_test do .and not_to_output.to_stderr .and be_a_success end + + it "prints as json with the --json=v2 flag" do + setup_test_formula "testball" + + expect { brew "info", "testball", "--json=v2" } + .to output(a_json_string).to_stdout + .and not_to_output.to_stderr + .and be_a_success + end end describe Homebrew do