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