31 lines
918 B
Ruby
Raw Normal View History

2020-08-05 10:10:05 -05:00
# frozen_string_literal: true
require "cmd/shared_examples/args_parse"
RSpec.describe "brew bump" do
it_behaves_like "parseable arguments"
2022-11-05 16:51:33 +00:00
describe "formula", :integration_test, :needs_homebrew_curl, :needs_network do
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
end
2024-03-05 16:02:16 -08:00
it "gives an error for `--tap` with official taps", :integration_test do
expect { brew "bump", "--tap", "Homebrew/core" }
.to output(/Invalid usage/).to_stderr
.and not_to_output.to_stdout
.and be_a_failure
end
2020-08-05 10:10:05 -05:00
end