brew/Library/Homebrew/test/dev-cmd/tap-new_spec.rb

22 lines
731 B
Ruby
Raw Normal View History

# frozen_string_literal: true
require "cmd/shared_examples/args_parse"
2024-03-21 21:47:55 -07:00
require "dev-cmd/tap-new"
2024-03-21 21:47:55 -07:00
RSpec.describe Homebrew::DevCmd::TapNew do
it_behaves_like "parseable arguments"
it "initializes a new tap with a README file and GitHub Actions CI", :integration_test do
# To ensure that Utils::Git.setup_gpg! doesn't raise an error
setup_test_formula "gnupg"
expect { brew "tap-new", "--no-git", "--verbose", "homebrew/foo" }
2017-02-23 06:04:40 +01:00
.to be_a_success
.and output(%r{homebrew/foo}).to_stdout
2017-02-23 06:04:40 +01:00
.and not_to_output.to_stderr
expect(HOMEBREW_LIBRARY/"Taps/homebrew/homebrew-foo/README.md").to exist
expect(HOMEBREW_LIBRARY/"Taps/homebrew/homebrew-foo/.github/workflows/tests.yml").to exist
2017-02-23 06:04:40 +01:00
end
end