repo
stringlengths
5
92
file_url
stringlengths
80
287
file_path
stringlengths
5
197
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:37:27
2026-01-04 17:58:21
truncated
bool
2 classes
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/utils/spdx_spec.rb
Library/Homebrew/test/utils/spdx_spec.rb
# frozen_string_literal: true require "utils/spdx" RSpec.describe SPDX do describe ".license_data" do it "has the license list version" do expect(described_class.license_data["licenseListVersion"]).not_to be_nil end it "has the release date" do expect(described_class.license_data["releaseDa...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/utils/bottles/collector_spec.rb
Library/Homebrew/test/utils/bottles/collector_spec.rb
# frozen_string_literal: true require "utils/bottles" RSpec.describe Utils::Bottles::Collector do subject(:collector) { described_class.new } let(:tahoe) { Utils::Bottles::Tag.from_symbol(:tahoe) } let(:sequoia) { Utils::Bottles::Tag.from_symbol(:sequoia) } let(:sonoma) { Utils::Bottles::Tag.from_symbol(:son...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/utils/bottles/bottles_spec.rb
Library/Homebrew/test/utils/bottles/bottles_spec.rb
# frozen_string_literal: true require "utils/bottles" RSpec.describe Utils::Bottles do describe "#tag", :needs_macos do it "returns :big_sur or :arm64_big_sur on Big Sur" do allow(MacOS).to receive(:version).and_return(MacOSVersion.new("11.0")) if Hardware::CPU.intel? expect(described_class....
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/utils/bottles/tag_spec.rb
Library/Homebrew/test/utils/bottles/tag_spec.rb
# frozen_string_literal: true require "utils/bottles" RSpec.describe Utils::Bottles::Tag do it "can parse macOS symbols with archs" do symbol = :arm64_big_sur tag = described_class.from_symbol(symbol) expect(tag.system).to eq(:big_sur) expect(tag.arch).to eq(:arm64) expect(tag.to_macos_version)....
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/utils/github/actions_spec.rb
Library/Homebrew/test/utils/github/actions_spec.rb
# frozen_string_literal: true require "utils/github/actions" RSpec.describe GitHub::Actions::Annotation do let(:message) { "lorem ipsum" } describe "#new" do it "fails when the type is wrong" do expect do described_class.new(:fatal, message, file: "file.txt") end.to raise_error(ArgumentEr...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/utils/ast/formula_ast_spec.rb
Library/Homebrew/test/utils/ast/formula_ast_spec.rb
# frozen_string_literal: true require "utils/ast" RSpec.describe Utils::AST::FormulaAST do subject(:formula_ast) do described_class.new <<~RUBY class Foo < Formula url "https://brew.sh/foo-1.0.tar.gz" license all_of: [ :public_domain, "MIT", "GPL-3.0-or-later"...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/utils/ast/ast_spec.rb
Library/Homebrew/test/utils/ast/ast_spec.rb
# frozen_string_literal: true require "utils/ast" RSpec.describe Utils::AST do describe ".stanza_text" do let(:compound_license) do <<-RUBY license all_of: [ :public_domain, "MIT", "GPL-3.0-or-later" => { with: "Autoconf-exception-3.0" }, ] RUBY end it "accepts existing stan...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/requirements/arch_requirement_spec.rb
Library/Homebrew/test/requirements/arch_requirement_spec.rb
# frozen_string_literal: true require "requirements/arch_requirement" RSpec.describe ArchRequirement do subject(:requirement) { described_class.new([Hardware::CPU.type]) } describe "#satisfied?" do it "supports architecture symbols" do expect(requirement).to be_satisfied end end end
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/requirements/codesign_requirement_spec.rb
Library/Homebrew/test/requirements/codesign_requirement_spec.rb
# frozen_string_literal: true require "requirements/codesign_requirement" RSpec.describe CodesignRequirement do subject(:requirement) do described_class.new([{ identity:, with:, url: }]) end let(:identity) { "lldb_codesign" } let(:with) { "LLDB" } let(:url) do "https://llvm.org/svn/llvm-project/lld...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/requirements/linux_requirement_spec.rb
Library/Homebrew/test/requirements/linux_requirement_spec.rb
# frozen_string_literal: true require "requirements/linux_requirement" RSpec.describe LinuxRequirement do subject(:requirement) { described_class.new } describe "#satisfied?" do it "returns true on Linux" do expect(requirement.satisfied?).to eq(OS.linux?) end end end
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/requirements/macos_requirement_spec.rb
Library/Homebrew/test/requirements/macos_requirement_spec.rb
# frozen_string_literal: true require "requirements/macos_requirement" RSpec.describe MacOSRequirement do subject(:requirement) { described_class.new } let(:macos_oldest_allowed) { MacOSVersion.new(HOMEBREW_MACOS_OLDEST_ALLOWED) } let(:macos_newest_allowed) { MacOSVersion.new(HOMEBREW_MACOS_NEWEST_UNSUPPORTED)...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/api/internal_spec.rb
Library/Homebrew/test/api/internal_spec.rb
# frozen_string_literal: true require "api/internal" RSpec.describe Homebrew::API::Internal do let(:cache_dir) { mktmpdir } before do FileUtils.mkdir_p(cache_dir/"internal") stub_const("Homebrew::API::HOMEBREW_CACHE_API", cache_dir) end def mock_curl_download(stdout:) allow(Utils::Curl).to recei...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/api/cask_spec.rb
Library/Homebrew/test/api/cask_spec.rb
# frozen_string_literal: true require "api" RSpec.describe Homebrew::API::Cask do let(:cache_dir) { mktmpdir } before do stub_const("Homebrew::API::HOMEBREW_CACHE_API", cache_dir) end def mock_curl_download(stdout:) allow(Utils::Curl).to receive(:curl_download) do |*_args, **kwargs| kwargs[:to...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/api/formula_spec.rb
Library/Homebrew/test/api/formula_spec.rb
# frozen_string_literal: true require "api" RSpec.describe Homebrew::API::Formula do let(:cache_dir) { mktmpdir } before do stub_const("Homebrew::API::HOMEBREW_CACHE_API", cache_dir) end def mock_curl_download(stdout:) allow(Utils::Curl).to receive(:curl_download) do |*_args, **kwargs| kwargs[...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/keg_relocate/text_spec.rb
Library/Homebrew/test/keg_relocate/text_spec.rb
# frozen_string_literal: true require "keg_relocate" RSpec.describe Keg do subject(:keg) { described_class.new(HOMEBREW_CELLAR/"foo/1.0.0") } let(:dir) { mktmpdir } let(:file) { dir/"file.txt" } let(:placeholder) { "@@PLACEHOLDER@@" } before do (HOMEBREW_CELLAR/"foo/1.0.0").mkpath end def setup_f...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/keg_relocate/binary_relocation_spec.rb
Library/Homebrew/test/keg_relocate/binary_relocation_spec.rb
# frozen_string_literal: true require "keg_relocate" RSpec.describe Keg do subject(:keg) { described_class.new(HOMEBREW_CELLAR/"foo/1.0.0") } let(:dir) { HOMEBREW_CELLAR/"foo/1.0.0" } let(:newdir) { HOMEBREW_CELLAR/"foo" } let(:binary_file) { dir/"file.bin" } before do dir.mkpath end def setup_bi...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/keg_relocate/relocation_spec.rb
Library/Homebrew/test/keg_relocate/relocation_spec.rb
# frozen_string_literal: true require "keg_relocate" RSpec.describe Keg::Relocation do let(:prefix) { HOMEBREW_PREFIX.to_s } let(:cellar) { HOMEBREW_CELLAR.to_s } let(:repository) { HOMEBREW_REPOSITORY.to_s } let(:library) { HOMEBREW_LIBRARY.to_s } let(:prefix_placeholder) { "@@HOMEBREW_PREFIX@@" } let(:c...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/keg_relocate/grep_spec.rb
Library/Homebrew/test/keg_relocate/grep_spec.rb
# frozen_string_literal: true require "keg_relocate" RSpec.describe Keg do subject(:keg) { described_class.new(HOMEBREW_CELLAR/"foo/1.0.0") } let(:dir) { HOMEBREW_CELLAR/"foo/1.0.0" } let(:text_file) { dir/"file.txt" } let(:binary_file) { dir/"file.bin" } before do dir.mkpath end def setup_text_f...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/download_strategies/subversion_spec.rb
Library/Homebrew/test/download_strategies/subversion_spec.rb
# frozen_string_literal: true require "download_strategy" RSpec.describe SubversionDownloadStrategy do subject(:strategy) { described_class.new(url, name, version, **specs) } let(:name) { "foo" } let(:url) { "https://example.com/foo.tar.gz" } let(:version) { "1.2.3" } let(:specs) { {} } describe "#fetch...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/download_strategies/curl_github_packages_spec.rb
Library/Homebrew/test/download_strategies/curl_github_packages_spec.rb
# frozen_string_literal: true require "download_strategy" RSpec.describe CurlGitHubPackagesDownloadStrategy do subject(:strategy) { described_class.new(url, name, version, **specs) } let(:name) { "foo" } let(:url) { "https://#{GitHubPackages::URL_DOMAIN}/v2/homebrew/core/spec_test/manifests/1.2.3" } let(:ver...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/download_strategies/git_spec.rb
Library/Homebrew/test/download_strategies/git_spec.rb
# frozen_string_literal: true require "download_strategy" RSpec.describe GitDownloadStrategy do subject(:strategy) { described_class.new(url, name, version) } let(:name) { "baz" } let(:url) { "https://github.com/homebrew/foo" } let(:version) { nil } let(:cached_location) { subject.cached_location } befo...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/download_strategies/vcs_spec.rb
Library/Homebrew/test/download_strategies/vcs_spec.rb
# frozen_string_literal: true require "download_strategy" RSpec.describe VCSDownloadStrategy do let(:url) { "https://example.com/bar" } let(:version) { nil } describe "#cached_location" do it "returns the path of the cached resource" do allow_any_instance_of(described_class).to receive(:cache_tag).an...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/download_strategies/curl_spec.rb
Library/Homebrew/test/download_strategies/curl_spec.rb
# frozen_string_literal: true require "download_strategy" RSpec.describe CurlDownloadStrategy do subject(:strategy) { described_class.new(url, name, version, **specs) } let(:name) { "foo" } let(:url) { "https://example.com/foo.tar.gz" } let(:version) { "1.2.3" } let(:specs) { { user: "download:123456" } } ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/download_strategies/abstract_spec.rb
Library/Homebrew/test/download_strategies/abstract_spec.rb
# frozen_string_literal: true require "download_strategy" RSpec.describe AbstractDownloadStrategy do subject(:strategy) { Class.new(described_class).new(url, name, version, **specs) } let(:specs) { {} } let(:name) { "foo" } let(:url) { "https://example.com/foo.tar.gz" } let(:version) { nil } let(:args) {...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/download_strategies/curl_post_spec.rb
Library/Homebrew/test/download_strategies/curl_post_spec.rb
# frozen_string_literal: true require "download_strategy" RSpec.describe CurlPostDownloadStrategy do subject(:strategy) { described_class.new(url, name, version, **specs) } let(:name) { "foo" } let(:url) { "https://example.com/foo.tar.gz" } let(:version) { "1.2.3" } let(:specs) { {} } let(:head_response)...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/download_strategies/github_git_spec.rb
Library/Homebrew/test/download_strategies/github_git_spec.rb
# frozen_string_literal: true require "download_strategy" RSpec.describe GitHubGitDownloadStrategy do subject(:strategy) { described_class.new(url, name, version) } let(:name) { "brew" } let(:url) { "https://github.com/homebrew/brew.git" } let(:version) { nil } it "parses the URL and sets the correspondin...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/download_strategies/detector_spec.rb
Library/Homebrew/test/download_strategies/detector_spec.rb
# frozen_string_literal: true require "download_strategy" RSpec.describe DownloadStrategyDetector do describe "::detect" do subject(:strategy_detector) { described_class.detect(url, strategy) } let(:url) { "invalidurl" } let(:strategy) { nil } context "when given Git URL" do let(:url) { "git...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/bundle/tap_installer_spec.rb
Library/Homebrew/test/bundle/tap_installer_spec.rb
# frozen_string_literal: true require "bundle" require "bundle/tap_installer" require "bundle/tap_dumper" RSpec.describe Homebrew::Bundle::TapInstaller do describe ".installed_taps" do before do Homebrew::Bundle::TapDumper.reset! end it "calls Homebrew" do expect { described_class.installed...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/bundle/go_installer_spec.rb
Library/Homebrew/test/bundle/go_installer_spec.rb
# frozen_string_literal: true require "bundle" require "bundle/go_installer" RSpec.describe Homebrew::Bundle::GoInstaller do context "when Go is not installed" do before do described_class.reset! allow(Homebrew::Bundle).to receive(:go_installed?).and_return(false) end it "tries to install g...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/bundle/bundle_spec.rb
Library/Homebrew/test/bundle/bundle_spec.rb
# frozen_string_literal: true require "bundle" require "bundle/dsl" RSpec.describe Homebrew::Bundle do context "when the system call succeeds" do it "omits all stdout output if verbose is false" do expect { described_class.system "echo", "foo", verbose: false }.not_to output.to_stdout_from_any_process ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/bundle/flatpak_installer_spec.rb
Library/Homebrew/test/bundle/flatpak_installer_spec.rb
# frozen_string_literal: true require "bundle" require "bundle/flatpak_installer" RSpec.describe Homebrew::Bundle::FlatpakInstaller do context "when Flatpak is not installed", :needs_linux do before do described_class.reset! allow(Homebrew::Bundle).to receive(:flatpak_installed?).and_return(false) ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/bundle/brew_services_spec.rb
Library/Homebrew/test/bundle/brew_services_spec.rb
# frozen_string_literal: true require "bundle" require "bundle/brew_services" RSpec.describe Homebrew::Bundle::BrewServices do describe ".started_services" do before do described_class.reset! end it "returns started services" do allow(Utils).to receive(:safe_popen_read).and_return <<~EOS ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/bundle/cask_installer_spec.rb
Library/Homebrew/test/bundle/cask_installer_spec.rb
# frozen_string_literal: true require "bundle" require "bundle/cask_dumper" require "bundle/cask_installer" RSpec.describe Homebrew::Bundle::CaskInstaller do describe ".installed_casks" do before do Homebrew::Bundle::CaskDumper.reset! end it "shells out" do expect { described_class.installe...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/bundle/cask_dumper_spec.rb
Library/Homebrew/test/bundle/cask_dumper_spec.rb
# frozen_string_literal: true require "bundle" require "bundle/cask_dumper" require "cask" RSpec.describe Homebrew::Bundle::CaskDumper do subject(:dumper) { described_class } context "when brew-cask is not installed" do before do described_class.reset! allow(Homebrew::Bundle).to receive(:cask_ins...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/bundle/brewfile_spec.rb
Library/Homebrew/test/bundle/brewfile_spec.rb
# frozen_string_literal: true require "bundle" require "bundle/brewfile" RSpec.describe Homebrew::Bundle::Brewfile do describe "path" do subject(:path) do described_class.path(dash_writes_to_stdout:, global: has_global, file: file_value) end let(:dash_writes_to_stdout) { false } let(:env_bund...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/bundle/dsl_spec.rb
Library/Homebrew/test/bundle/dsl_spec.rb
# frozen_string_literal: true require "bundle" require "bundle/dsl" RSpec.describe Homebrew::Bundle::Dsl do def dsl_from_string(string) described_class.new(StringIO.new(string)) end context "with a DSL example" do subject(:dsl) do dsl_from_string <<~EOS # frozen_string_literal: true ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/bundle/mac_app_store_installer_spec.rb
Library/Homebrew/test/bundle/mac_app_store_installer_spec.rb
# frozen_string_literal: true require "bundle" require "bundle/mac_app_store_installer" RSpec.describe Homebrew::Bundle::MacAppStoreInstaller do before do stub_formula_loader formula("mas") { url "mas-1.0" } end describe ".installed_app_ids" do it "shells out" do expect { described_class.installe...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/bundle/tap_dumper_spec.rb
Library/Homebrew/test/bundle/tap_dumper_spec.rb
# frozen_string_literal: true require "bundle" require "bundle/skipper" require "bundle/tap_dumper" RSpec.describe Homebrew::Bundle::TapDumper do subject(:dumper) { described_class } context "when there is no tap" do before do described_class.reset! allow(Tap).to receive(:select).and_return [] ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/bundle/cargo_dumper_spec.rb
Library/Homebrew/test/bundle/cargo_dumper_spec.rb
# frozen_string_literal: true require "bundle" require "bundle/cargo_dumper" RSpec.describe Homebrew::Bundle::CargoDumper do subject(:dumper) { described_class } context "when cargo is not installed" do before do described_class.reset! allow(Homebrew::Bundle).to receive(:cargo_installed?).and_ret...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/bundle/go_dumper_spec.rb
Library/Homebrew/test/bundle/go_dumper_spec.rb
# frozen_string_literal: true require "bundle" require "bundle/go_dumper" RSpec.describe Homebrew::Bundle::GoDumper do subject(:dumper) { described_class } context "when go is not installed" do before do described_class.reset! allow(Homebrew::Bundle).to receive(:go_installed?).and_return(false) ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/bundle/dumper_spec.rb
Library/Homebrew/test/bundle/dumper_spec.rb
# frozen_string_literal: true require "bundle" require "bundle/dumper" require "bundle/formula_dumper" require "bundle/tap_dumper" require "bundle/cask_dumper" require "bundle/mac_app_store_dumper" require "bundle/vscode_extension_dumper" require "bundle/brew_services" require "bundle/go_dumper" require "bundle/cargo_...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/bundle/mac_app_store_dumper_spec.rb
Library/Homebrew/test/bundle/mac_app_store_dumper_spec.rb
# frozen_string_literal: true require "bundle" require "bundle/mac_app_store_dumper" RSpec.describe Homebrew::Bundle::MacAppStoreDumper do subject(:dumper) { described_class } context "when mas is not installed" do before do described_class.reset! allow(Homebrew::Bundle).to receive(:mas_installed...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/bundle/vscode_extension_dumper_spec.rb
Library/Homebrew/test/bundle/vscode_extension_dumper_spec.rb
# frozen_string_literal: true require "bundle" require "bundle/vscode_extension_dumper" RSpec.describe Homebrew::Bundle::VscodeExtensionDumper do subject(:dumper) { described_class } context "when vscode is not installed" do before do described_class.reset! allow(Homebrew::Bundle).to receive(:vsc...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/bundle/skipper_spec.rb
Library/Homebrew/test/bundle/skipper_spec.rb
# frozen_string_literal: true require "ostruct" require "bundle" require "bundle/skipper" require "bundle/dsl" RSpec.describe Homebrew::Bundle::Skipper do subject(:skipper) { described_class } before do allow(ENV).to receive(:[]).and_return(nil) allow(ENV).to receive(:[]).with("HOMEBREW_BUNDLE_BREW_SKIP"...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/bundle/remover_spec.rb
Library/Homebrew/test/bundle/remover_spec.rb
# frozen_string_literal: true require "bundle" require "bundle/remover" RSpec.describe Homebrew::Bundle::Remover do subject(:remover) { described_class } let(:name) { "foo" } before { allow(Formulary).to receive(:factory).with(name).and_raise(FormulaUnavailableError.new(name)) } it "raises no errors when r...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/bundle/formula_installer_spec.rb
Library/Homebrew/test/bundle/formula_installer_spec.rb
# frozen_string_literal: true require "bundle" require "formula" require "bundle/formula_installer" require "bundle/formula_dumper" require "bundle/brew_services" RSpec.describe Homebrew::Bundle::FormulaInstaller do let(:formula_name) { "mysql" } let(:options) { { args: ["with-option"] } } let(:installer) { des...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/bundle/formula_dumper_spec.rb
Library/Homebrew/test/bundle/formula_dumper_spec.rb
# frozen_string_literal: true require "ostruct" require "bundle" require "bundle/formula_dumper" require "tsort" require "formula" require "tab" require "utils/bottles" # TODO: remove OpenStruct usage # rubocop:todo Style/OpenStructUse RSpec.describe Homebrew::Bundle::FormulaDumper do subject(:dumper) { described_c...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/bundle/vscode_extension_installer_spec.rb
Library/Homebrew/test/bundle/vscode_extension_installer_spec.rb
# frozen_string_literal: true require "bundle" require "bundle/vscode_extension_installer" require "extend/kernel" RSpec.describe Homebrew::Bundle::VscodeExtensionInstaller do context "when VSCode is not installed" do before do described_class.reset! allow(Homebrew::Bundle).to receive_messages(vscod...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/bundle/flatpak_checker_spec.rb
Library/Homebrew/test/bundle/flatpak_checker_spec.rb
# frozen_string_literal: true require "bundle" require "bundle/flatpak_checker" require "bundle/flatpak_installer" RSpec.describe Homebrew::Bundle::Checker::FlatpakChecker do subject(:checker) { described_class.new } let(:entry) { Homebrew::Bundle::Dsl::Entry.new(:flatpak, "org.gnome.Calculator") } before do ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/bundle/cargo_installer_spec.rb
Library/Homebrew/test/bundle/cargo_installer_spec.rb
# frozen_string_literal: true require "bundle" require "bundle/cargo_installer" RSpec.describe Homebrew::Bundle::CargoInstaller do context "when Cargo is not installed" do before do described_class.reset! allow(Homebrew::Bundle).to receive(:cargo_installed?).and_return(false) end it "tries ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/bundle/flatpak_dumper_spec.rb
Library/Homebrew/test/bundle/flatpak_dumper_spec.rb
# frozen_string_literal: true require "bundle" require "bundle/flatpak_dumper" RSpec.describe Homebrew::Bundle::FlatpakDumper do subject(:dumper) { described_class } context "when flatpak is not installed" do before do described_class.reset! allow(Homebrew::Bundle).to receive(:flatpak_installed?)...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/bundle/installer_spec.rb
Library/Homebrew/test/bundle/installer_spec.rb
# frozen_string_literal: true require "bundle" require "bundle/dsl" require "bundle/installer" RSpec.describe Homebrew::Bundle::Installer do let(:formula_entry) { Homebrew::Bundle::Dsl::Entry.new(:brew, "mysql") } let(:cask_options) { { args: {}, full_name: "homebrew/cask/google-chrome" } } let(:cask_entry) { H...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/bundle/commands/remove_spec.rb
Library/Homebrew/test/bundle/commands/remove_spec.rb
# frozen_string_literal: true require "bundle" require "bundle/commands/remove" require "cask/cask_loader" RSpec.describe Homebrew::Bundle::Commands::Remove do subject(:remove) do described_class.run(*args, type:, global:, file:) end before { File.write(file, content) } after { FileUtils.rm_f file } l...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/bundle/commands/install_spec.rb
Library/Homebrew/test/bundle/commands/install_spec.rb
# frozen_string_literal: true require "bundle" require "bundle/commands/install" require "bundle/cask_dumper" require "bundle/skipper" RSpec.describe Homebrew::Bundle::Commands::Install do before do allow_any_instance_of(IO).to receive(:puts) end context "when a Brewfile is not found" do it "raises an ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/bundle/commands/check_spec.rb
Library/Homebrew/test/bundle/commands/check_spec.rb
# frozen_string_literal: true require "bundle" require "bundle/commands/check" require "bundle/brew_checker" require "bundle/cask_checker" require "bundle/mac_app_store_checker" require "bundle/vscode_extension_checker" require "bundle/formula_installer" require "bundle/cask_installer" require "bundle/mac_app_store_in...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/bundle/commands/list_spec.rb
Library/Homebrew/test/bundle/commands/list_spec.rb
# frozen_string_literal: true require "bundle" require "bundle/commands/list" TYPES_AND_DEPS = { taps: "phinze/cask", formulae: "mysql", casks: "google-chrome", mas: "1Password", vscode: "shopify.ruby-lsp", go: "github.com/charmbracelet/crush", cargo: "ripgrep", }.freeze COMBINAT...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/bundle/commands/cleanup_spec.rb
Library/Homebrew/test/bundle/commands/cleanup_spec.rb
# frozen_string_literal: true require "bundle" require "bundle/commands/cleanup" RSpec.describe Homebrew::Bundle::Commands::Cleanup do describe "read Brewfile and current installation", :no_api do before do described_class.reset! # don't try to load gcc/glibc allow(DevelopmentTools).to receiv...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/bundle/commands/dump_spec.rb
Library/Homebrew/test/bundle/commands/dump_spec.rb
# frozen_string_literal: true require "bundle" require "bundle/commands/dump" require "bundle/cask_dumper" require "bundle/formula_dumper" require "bundle/tap_dumper" require "bundle/vscode_extension_dumper" require "bundle/cargo_dumper" RSpec.describe Homebrew::Bundle::Commands::Dump do subject(:dump) do descr...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/bundle/commands/add_spec.rb
Library/Homebrew/test/bundle/commands/add_spec.rb
# frozen_string_literal: true require "bundle" require "bundle/commands/add" require "cask/cask_loader" RSpec.describe Homebrew::Bundle::Commands::Add do subject(:add) do described_class.run(*args, type:, global:, file:) end before { FileUtils.touch file } after { FileUtils.rm_f file } let(:global) { ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/bundle/commands/exec_spec.rb
Library/Homebrew/test/bundle/commands/exec_spec.rb
# frozen_string_literal: true require "bundle" require "bundle/commands/exec" require "bundle/brewfile" require "bundle/brew_services" RSpec.describe Homebrew::Bundle::Commands::Exec do context "when a Brewfile is not found" do it "raises an error" do expect { described_class.run }.to raise_error(RuntimeE...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/rubocops/disable_comment_spec.rb
Library/Homebrew/test/rubocops/disable_comment_spec.rb
# frozen_string_literal: true require "rubocops/disable_comment" RSpec.describe RuboCop::Cop::DisableComment, :config do shared_examples "offense" do |source, correction, message| it "registers an offense and corrects" do expect_offense(<<~RUBY, source:, message:) #{source} ^{source} #{mes...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/rubocops/components_order_spec.rb
Library/Homebrew/test/rubocops/components_order_spec.rb
# frozen_string_literal: true require "rubocops/components_order" RSpec.describe RuboCop::Cop::FormulaAudit::ComponentsOrder do subject(:cop) { described_class.new } context "when auditing formula components order" do it "reports and corrects an offense when `uses_from_macos` precedes `depends_on`" do ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
true
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/rubocops/patches_spec.rb
Library/Homebrew/test/rubocops/patches_spec.rb
# frozen_string_literal: true require "rubocops/patches" RSpec.describe RuboCop::Cop::FormulaAudit::Patches do subject(:cop) { described_class.new } def expect_offense_hash(message:, severity:, line:, column:, source:) [{ message:, severity:, line:, column:, source: }] end context "when auditing legacy ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/rubocops/version_spec.rb
Library/Homebrew/test/rubocops/version_spec.rb
# frozen_string_literal: true require "rubocops/version" RSpec.describe RuboCop::Cop::FormulaAudit::Version do subject(:cop) { described_class.new } context "when auditing version" do it "reports an offense if `version` is an empty string" do expect_offense(<<~RUBY) class Foo < Formula ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/rubocops/desc_spec.rb
Library/Homebrew/test/rubocops/desc_spec.rb
# frozen_string_literal: true require "rubocops/desc" RSpec.describe RuboCop::Cop::FormulaAudit::Desc do subject(:cop) { described_class.new } context "when auditing formula `desc` methods" do it "reports an offense when there is no `desc`" do expect_offense(<<~RUBY) class Foo < Formula ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/rubocops/urls_spec.rb
Library/Homebrew/test/rubocops/urls_spec.rb
# frozen_string_literal: true require "rubocops/urls" RSpec.describe RuboCop::Cop::FormulaAudit::Urls do subject(:cop) { described_class.new } let(:offense_list) do [{ "url" => "https://ftp.gnu.org/lightning/lightning-2.1.0.tar.gz", "msg" => "https://ftp.gnu.org/lightning/lightning-2.1.0.tar.gz s...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/rubocops/text_spec.rb
Library/Homebrew/test/rubocops/text_spec.rb
# frozen_string_literal: true require "rubocops/text" RSpec.describe RuboCop::Cop::FormulaAudit::Text do subject(:cop) { described_class.new } context "when auditing formula text" do it 'reports an offense if `require "formula"` is present' do expect_offense(<<~RUBY) require "formula" ^...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/rubocops/compact_blank_spec.rb
Library/Homebrew/test/rubocops/compact_blank_spec.rb
# frozen_string_literal: true require "rubocops/compact_blank" RSpec.describe RuboCop::Cop::Homebrew::CompactBlank, :config do it "registers and corrects an offense when using `reject { |e| e.blank? }`" do expect_offense(<<~RUBY) collection.reject { |e| e.blank? } ^^^^^^^^^^^^^^^^^^^^^^^ ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/rubocops/caveats_spec.rb
Library/Homebrew/test/rubocops/caveats_spec.rb
# frozen_string_literal: true require "rubocops/caveats" RSpec.describe RuboCop::Cop::FormulaAudit::Caveats do subject(:cop) { described_class.new } context "when auditing `caveats`" do it "reports an offense if `setuid` is mentioned" do expect_offense(<<~RUBY) class Foo < Formula hom...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/rubocops/uses_from_macos_spec.rb
Library/Homebrew/test/rubocops/uses_from_macos_spec.rb
# frozen_string_literal: true require "rubocops/uses_from_macos" RSpec.describe RuboCop::Cop::FormulaAudit::UsesFromMacos do subject(:cop) { described_class.new } context "when auditing `uses_from_macos` dependencies" do it "reports an offense when used on non-macOS dependency" do expect_offense(<<~RUB...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/rubocops/keg_only_spec.rb
Library/Homebrew/test/rubocops/keg_only_spec.rb
# frozen_string_literal: true require "rubocops/keg_only" RSpec.describe RuboCop::Cop::FormulaAudit::KegOnly do subject(:cop) { described_class.new } it "reports and corrects an offense when the `keg_only` reason is capitalized" do expect_offense(<<~RUBY) class Foo < Formula url "https://brew....
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/rubocops/blank_spec.rb
Library/Homebrew/test/rubocops/blank_spec.rb
# frozen_string_literal: true require "rubocops/blank" RSpec.describe RuboCop::Cop::Homebrew::Blank, :config do shared_examples "offense" do |source, correction, message| it "registers an offense and corrects" do expect_offense(<<~RUBY, source:, message:) #{source} ^{source} #{message} ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/rubocops/move_to_extend_os_spec.rb
Library/Homebrew/test/rubocops/move_to_extend_os_spec.rb
# frozen_string_literal: true require "rubocops/move_to_extend_os" RSpec.describe RuboCop::Cop::Homebrew::MoveToExtendOS do subject(:cop) { described_class.new } it "registers an offense when using `OS.linux?`" do expect_offense(<<~RUBY) OS.linux? ^^^^^^^^^ Homebrew/MoveToExtendOS: Move `OS.linux...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/rubocops/negate_include_spec.rb
Library/Homebrew/test/rubocops/negate_include_spec.rb
# frozen_string_literal: true require "rubocops/negate_include" RSpec.describe RuboCop::Cop::Homebrew::NegateInclude, :config do it "registers an offense and corrects when using `!include?`" do expect_offense(<<~RUBY) !array.include?(2) ^^^^^^^^^^^^^^^^^^ Use `.exclude?` and remove the negation part...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/rubocops/present_spec.rb
Library/Homebrew/test/rubocops/present_spec.rb
# frozen_string_literal: true require "rubocops/present" RSpec.describe RuboCop::Cop::Homebrew::Present, :config do shared_examples "offense" do |source, correction, message| it "registers an offense and corrects" do expect_offense(<<~RUBY, source:, message:) #{source} ^{source} #{message}...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/rubocops/safe_navigation_with_blank_spec.rb
Library/Homebrew/test/rubocops/safe_navigation_with_blank_spec.rb
# frozen_string_literal: true require "rubocops/safe_navigation_with_blank" RSpec.describe RuboCop::Cop::Homebrew::SafeNavigationWithBlank, :config do context "when in a conditional" do it "registers an offense on a single conditional" do expect_offense(<<~RUBY) do_something unless foo&.blank? ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/rubocops/zero_zero_zero_zero_spec.rb
Library/Homebrew/test/rubocops/zero_zero_zero_zero_spec.rb
# frozen_string_literal: true require "rubocops/zero_zero_zero_zero" RSpec.describe RuboCop::Cop::FormulaAudit::ZeroZeroZeroZero do subject(:cop) { described_class.new } it "reports no offenses when 0.0.0.0 is used inside test do blocks" do expect_no_offenses(<<~RUBY, "/homebrew-core/") class Foo < For...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/rubocops/presence_spec.rb
Library/Homebrew/test/rubocops/presence_spec.rb
# frozen_string_literal: true require "rubocops/presence" RSpec.describe RuboCop::Cop::Homebrew::Presence, :config do it "registers an offense and corrects when `a.present? ? a : nil`" do expect_offense(<<~RUBY) a.present? ? a : nil ^^^^^^^^^^^^^^^^^^^^ Use `a.presence` instead of `a.present? ? a : ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/rubocops/exec_shell_metacharacters_spec.rb
Library/Homebrew/test/rubocops/exec_shell_metacharacters_spec.rb
# frozen_string_literal: true require "rubocops/shell_commands" RSpec.describe RuboCop::Cop::Homebrew::ExecShellMetacharacters do subject(:cop) { described_class.new } context "when auditing exec calls" do it "reports aan offense when output piping is used" do expect_offense(<<~RUBY) fork do ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/rubocops/install_bundler_gems_spec.rb
Library/Homebrew/test/rubocops/install_bundler_gems_spec.rb
# frozen_string_literal: true require "rubocops/install_bundler_gems" RSpec.describe RuboCop::Cop::Homebrew::InstallBundlerGems, :config do it "registers an offense and corrects when using `Homebrew.install_bundler_gems!`" do expect_offense(<<~RUBY) Homebrew.install_bundler_gems! ^^^^^^^^^^^^^^^^^^^...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/rubocops/files_spec.rb
Library/Homebrew/test/rubocops/files_spec.rb
# frozen_string_literal: true require "rubocops/files" RSpec.describe RuboCop::Cop::FormulaAudit::Files do subject(:cop) { described_class.new } context "when auditing files" do it "reports an offense when the permissions are invalid" do filename = Formulary.core_path("test_formula") File.open(fi...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/rubocops/service_spec.rb
Library/Homebrew/test/rubocops/service_spec.rb
# frozen_string_literal: true require "rubocops/service" RSpec.describe RuboCop::Cop::FormulaAudit::Service do subject(:cop) { described_class.new } it "reports offenses when a service block is missing a required command" do expect_offense(<<~RUBY) class Foo < Formula url "https://brew.sh/foo-1...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/rubocops/components_redundancy_spec.rb
Library/Homebrew/test/rubocops/components_redundancy_spec.rb
# frozen_string_literal: true require "rubocops/components_redundancy" RSpec.describe RuboCop::Cop::FormulaAudit::ComponentsRedundancy do subject(:cop) { described_class.new } context "when auditing formula components" do it "reports an offense if `url` is outside `stable` block" do expect_offense(<<~R...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/rubocops/io_read_spec.rb
Library/Homebrew/test/rubocops/io_read_spec.rb
# frozen_string_literal: true require "rubocops/io_read" RSpec.describe RuboCop::Cop::Homebrew::IORead do subject(:cop) { described_class.new } it "reports an offense when `IO.read` is used with a pipe character" do expect_offense(<<~RUBY) IO.read("|echo test") ^^^^^^^^^^^^^^^^^^^^^ Homebrew/IORe...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/rubocops/provided_by_macos_spec.rb
Library/Homebrew/test/rubocops/provided_by_macos_spec.rb
# frozen_string_literal: true require "rubocops/uses_from_macos" RSpec.describe RuboCop::Cop::FormulaAudit::ProvidedByMacos do subject(:cop) { described_class.new } it "fails for formulae not in PROVIDED_BY_MACOS_FORMULAE list" do expect_offense(<<~RUBY) class Baz < Formula url "https://brew.sh...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/rubocops/resource_requires_dependencies_spec.rb
Library/Homebrew/test/rubocops/resource_requires_dependencies_spec.rb
# frozen_string_literal: true require "rubocops/resource_requires_dependencies" RSpec.describe RuboCop::Cop::FormulaAudit::ResourceRequiresDependencies do subject(:cop) { described_class.new } context "when a formula does not have any resources" do it "does not report offenses" do expect_no_offenses(<<...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/rubocops/lines_spec.rb
Library/Homebrew/test/rubocops/lines_spec.rb
# frozen_string_literal: true require "rubocops/lines" RSpec.describe RuboCop::Cop::FormulaAudit::Lines do subject(:cop) { described_class.new } context "when auditing deprecated special dependencies" do it "reports an offense when using depends_on :automake" do expect_offense(<<~RUBY) class Fo...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/rubocops/no_fileutils_rmrf_spec.rb
Library/Homebrew/test/rubocops/no_fileutils_rmrf_spec.rb
# frozen_string_literal: true require "rubocops/no_fileutils_rmrf" RSpec.describe RuboCop::Cop::Homebrew::NoFileutilsRmrf do subject(:cop) { described_class.new } describe "rm_rf" do it "registers an offense" do expect_offense(<<~RUBY) rm_rf("path/to/directory") ^^^^^^^^^^^^^^^^^^^^^^^^...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/rubocops/dependency_order_spec.rb
Library/Homebrew/test/rubocops/dependency_order_spec.rb
# frozen_string_literal: true require "rubocops/dependency_order" RSpec.describe RuboCop::Cop::FormulaAudit::DependencyOrder do subject(:cop) { described_class.new } context "when auditing `uses_from_macos`" do it "reports and corrects incorrectly ordered conditional dependencies" do expect_offense(<<~...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/rubocops/shell_commands_spec.rb
Library/Homebrew/test/rubocops/shell_commands_spec.rb
# frozen_string_literal: true require "rubocops/shell_commands" RSpec.describe RuboCop::Cop::Homebrew::ShellCommands do subject(:cop) { described_class.new } context "when auditing shell commands" do it "reports and corrects an offense when `system` arguments should be separated" do expect_offense(<<~R...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/rubocops/no_autobump.rb
Library/Homebrew/test/rubocops/no_autobump.rb
# frozen_string_literal: true require "rubocops/no_autobump" RSpec.describe RuboCop::Cop::FormulaAudit::NoAutobump do subject(:cop) { described_class.new } it "reports no offenses if `reason` is acceptable" do expect_no_offenses(<<~RUBY) class Foo < Formula url 'https://brew.sh/foo-1.0.tgz' ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/rubocops/conflicts_spec.rb
Library/Homebrew/test/rubocops/conflicts_spec.rb
# frozen_string_literal: true require "rubocops/conflicts" RSpec.describe RuboCop::Cop::FormulaAudit::Conflicts do subject(:cop) { described_class.new } context "when auditing `conflicts_with`" do it "reports and corrects an offense if reason is capitalized" do expect_offense(<<~RUBY, "/homebrew-core/F...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/rubocops/homepage_spec.rb
Library/Homebrew/test/rubocops/homepage_spec.rb
# frozen_string_literal: true require "rubocops/homepage" RSpec.describe RuboCop::Cop::FormulaAudit::Homepage do subject(:cop) { described_class.new } context "when auditing homepage" do it "reports an offense when there is no homepage" do expect_offense(<<~RUBY) class Foo < Formula ^^^...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/rubocops/options_spec.rb
Library/Homebrew/test/rubocops/options_spec.rb
# frozen_string_literal: true require "rubocops/options" RSpec.describe RuboCop::Cop::FormulaAudit::Options do subject(:cop) { described_class.new } context "when auditing options" do it "reports an offense when using bad option names" do expect_offense(<<~RUBY) class Foo < Formula ur...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/rubocops/bottle/bottle_order_spec.rb
Library/Homebrew/test/rubocops/bottle/bottle_order_spec.rb
# frozen_string_literal: true require "rubocops/bottle" RSpec.describe RuboCop::Cop::FormulaAudit::BottleOrder do subject(:cop) { described_class.new } it "reports no offenses for `bottle :unneeded`" do expect_no_offenses(<<~RUBY) class Foo < Formula url "https://brew.sh/foo-1.0.tgz" b...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/rubocops/bottle/bottle_format_spec.rb
Library/Homebrew/test/rubocops/bottle/bottle_format_spec.rb
# frozen_string_literal: true require "rubocops/bottle" RSpec.describe RuboCop::Cop::FormulaAudit::BottleFormat do subject(:cop) { described_class.new } it "reports no offenses for `bottle :unneeded`" do expect_no_offenses(<<~RUBY) class Foo < Formula url "https://brew.sh/foo-1.0.tgz" ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/rubocops/bottle/bottle_tag_indentation_spec.rb
Library/Homebrew/test/rubocops/bottle/bottle_tag_indentation_spec.rb
# frozen_string_literal: true require "rubocops/bottle" RSpec.describe RuboCop::Cop::FormulaAudit::BottleTagIndentation do subject(:cop) { described_class.new } it "reports no offenses for `bottle :unneeded`" do expect_no_offenses(<<~RUBY) class Foo < Formula url "https://brew.sh/foo-1.0.tgz" ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/rubocops/bottle/bottle_digest_indentation_spec.rb
Library/Homebrew/test/rubocops/bottle/bottle_digest_indentation_spec.rb
# frozen_string_literal: true require "rubocops/bottle" RSpec.describe RuboCop::Cop::FormulaAudit::BottleDigestIndentation do subject(:cop) { described_class.new } it "reports no offenses for `bottle :unneeded`" do expect_no_offenses(<<~RUBY) class Foo < Formula url "https://brew.sh/foo-1.0.tgz...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/rubocops/livecheck/url_provided_spec.rb
Library/Homebrew/test/rubocops/livecheck/url_provided_spec.rb
# frozen_string_literal: true require "rubocops/livecheck" RSpec.describe RuboCop::Cop::FormulaAudit::LivecheckUrlProvided do subject(:cop) { described_class.new } it "reports an offense when a `url` is not specified in a `livecheck` block" do expect_offense(<<~RUBY) class Foo < Formula url "ht...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false
Homebrew/brew
https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/rubocops/livecheck/skip_spec.rb
Library/Homebrew/test/rubocops/livecheck/skip_spec.rb
# frozen_string_literal: true require "rubocops/livecheck" RSpec.describe RuboCop::Cop::FormulaAudit::LivecheckSkip do subject(:cop) { described_class.new } it "reports an offense when a skipped formula's `livecheck` block contains other information" do expect_offense(<<~RUBY) class Foo < Formula ...
ruby
BSD-2-Clause
fe0a384e3a04605192726c149570fbe33a8996b0
2026-01-04T15:37:27.366412Z
false