2020-10-10 14:16:11 +02:00
|
|
|
# typed: false
|
2020-08-05 10:10:05 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require "cmd/shared_examples/args_parse"
|
|
|
|
|
2020-08-13 09:56:41 -05:00
|
|
|
describe "brew bump" do
|
2021-02-01 16:14:25 -05:00
|
|
|
it_behaves_like "parseable arguments"
|
2020-08-13 09:56:41 -05:00
|
|
|
|
2021-09-24 22:44:27 -04:00
|
|
|
describe "formula", :integration_test, :needs_network, :needs_tls13 do
|
2020-08-19 09:10:57 -05:00
|
|
|
it "returns data for single valid specified formula" do
|
2020-08-13 09:56:41 -05:00
|
|
|
install_test_formula "testball"
|
|
|
|
|
2020-08-16 18:45:50 -05:00
|
|
|
expect { brew "bump", "testball" }
|
2020-08-13 09:56:41 -05:00
|
|
|
.to output.to_stdout
|
|
|
|
.and not_to_output.to_stderr
|
|
|
|
.and be_a_success
|
|
|
|
end
|
2020-08-19 09:10:57 -05:00
|
|
|
|
|
|
|
it "returns data for multiple valid specified formula" do
|
|
|
|
install_test_formula "testball"
|
|
|
|
install_test_formula "testball2"
|
|
|
|
|
|
|
|
expect { brew "bump", "testball", "testball2" }
|
|
|
|
.to output.to_stdout
|
|
|
|
.and not_to_output.to_stderr
|
|
|
|
.and be_a_success
|
|
|
|
end
|
2021-01-25 17:12:43 +05:30
|
|
|
|
|
|
|
it "returns no data and prints a message for HEAD-only formulae" do
|
|
|
|
content = <<~RUBY
|
|
|
|
desc "HEAD-only test formula"
|
|
|
|
homepage "https://brew.sh"
|
|
|
|
head "https://github.com/Homebrew/brew.git"
|
|
|
|
RUBY
|
|
|
|
setup_test_formula("headonly", content)
|
|
|
|
|
|
|
|
expect { brew "bump", "headonly" }
|
|
|
|
.to output(/Formula is HEAD-only./).to_stdout
|
|
|
|
.and not_to_output.to_stderr
|
|
|
|
.and be_a_success
|
|
|
|
end
|
2020-08-13 09:56:41 -05:00
|
|
|
end
|
2020-08-05 10:10:05 -05:00
|
|
|
end
|