Replace test for checking formulae tap

As suggested by @Rylan12, integration tests are super slow.

Co-Authored-By: Rylan Polster <rslpolster@gmail.com>
This commit is contained in:
Carlos Álvaro 2021-02-07 19:07:54 +01:00
parent aebf4c9100
commit ce7ab823ed
No known key found for this signature in database
GPG Key ID: AFEB19BC24ACCFE5
2 changed files with 1 additions and 20 deletions

View File

@ -6,19 +6,6 @@ require "cmd/info"
require "cmd/shared_examples/args_parse"
describe "brew info" do
let(:tarball) do
if OS.linux?
TEST_FIXTURE_DIR/"tarballs/testball-0.1-linux.tbz"
else
TEST_FIXTURE_DIR/"tarballs/testball-0.1.tbz"
end
end
let(:expected_output) {
<<~EOS
{"formulae":[{"name":"testball","full_name":"testball","tap":"homebrew/core","oldname":null,"aliases":[],"versioned_formulae":[],"desc":"Some test","license":null,"homepage":"https://brew.sh/testball","versions":{"stable":"0.1","head":null,"bottle":false},"urls":{"stable":{"url":"file://#{tarball}","tag":null,"revision":null}},"revision":0,"version_scheme":0,"bottle":{},"keg_only":false,"bottle_disabled":false,"options":[{"option":"--with-foo","description":"Build with foo"}],"build_dependencies":[],"dependencies":[],"recommended_dependencies":[],"optional_dependencies":[],"uses_from_macos":[],"requirements":[],"conflicts_with":[],"caveats":null,"installed":[],"linked_keg":null,"pinned":false,"outdated":false,"deprecated":false,"deprecation_date":null,"deprecation_reason":null,"disabled":false,"disable_date":null,"disable_reason":null}],"casks":[]}
EOS
}
it_behaves_like "parseable arguments"
it "prints as json with the --json=v1 flag", :integration_test do
@ -39,13 +26,6 @@ describe "brew info" do
.and be_a_success
end
it "check --json=v2 format", :integration_test do
setup_test_formula "testball"
expect { brew "info", "testball", "--json=v2" }
.to output(expected_output).to_stdout
end
describe Homebrew do
describe "::github_remote_path" do
let(:remote) { "https://github.com/Homebrew/homebrew-core" }

View File

@ -838,6 +838,7 @@ describe Formula do
expect(h).to be_a(Hash)
expect(h["name"]).to eq("foo")
expect(h["full_name"]).to eq("foo")
expect(h["tap"]).to eq("homebrew/core")
expect(h["versions"]["stable"]).to eq("1.0")
expect(h["versions"]["bottle"]).to be_truthy
end