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/tap_auditor_spec.rb | Library/Homebrew/test/tap_auditor_spec.rb | # frozen_string_literal: true
require "tap_auditor"
RSpec.describe Homebrew::TapAuditor do
let(:tap) { Tap.fetch("homebrew", "foo") }
let(:tap_path) { tap.path }
let(:auditor) { described_class.new(tap, strict: false) }
def write_cask(token, path = tap_path/"Casks"/"#{token}.rb")
path.dirname.mkpath
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/formula_spec.rb | Library/Homebrew/test/formula_spec.rb | # frozen_string_literal: true
require "test/support/fixtures/testball"
require "formula"
PHASES = [:build, :postinstall, :test].freeze
RSpec.describe Formula do
alias_matcher :follow_installed_alias, :be_follow_installed_alias
alias_matcher :have_any_version_installed, :be_any_version_installed
alias_matcher :... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | true |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/patch_spec.rb | Library/Homebrew/test/patch_spec.rb | # frozen_string_literal: true
require "patch"
RSpec.describe Patch do
describe "#create" do
context "with a simple patch" do
subject(:patch) { described_class.create(:p2, nil) }
specify(:aggregate_failures) do
expect(subject).to be_a ExternalPatch # rubocop:todo RSpec/NamedSubject
e... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/locale_spec.rb | Library/Homebrew/test/locale_spec.rb | # frozen_string_literal: true
require "locale"
RSpec.describe Locale do
describe "::parse" do
it "parses a string in the correct format" do
expect(described_class.parse("zh")).to eql(described_class.new("zh", nil, nil))
expect(described_class.parse("zh-CN")).to eql(described_class.new("zh", nil, "CN... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/github_runner_matrix_spec.rb | Library/Homebrew/test/github_runner_matrix_spec.rb | # frozen_string_literal: true
require "github_runner_matrix"
require "test/support/fixtures/testball"
RSpec.describe GitHubRunnerMatrix, :no_api do
before do
allow(ENV).to receive(:fetch).and_call_original
allow(ENV).to receive(:fetch).with("HOMEBREW_LINUX_RUNNER").and_return("ubuntu-latest")
allow(ENV)... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/bottle_specification_spec.rb | Library/Homebrew/test/bottle_specification_spec.rb | # frozen_string_literal: true
require "bottle_specification"
RSpec.describe BottleSpecification do
subject(:bottle_spec) { described_class.new }
describe "#sha256" do
it "works without cellar" do
checksums = {
arm64_tahoe: "deadbeef" * 8,
tahoe: "faceb00c" * 8,
sequoia: ... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/formulary_spec.rb | Library/Homebrew/test/formulary_spec.rb | # frozen_string_literal: true
require "formula"
require "formula_installer"
require "utils/bottles"
# rubocop:todo RSpec/AggregateExamples
RSpec.describe Formulary do
let(:formula_name) { "testball_bottle" }
let(:formula_path) { CoreTap.instance.new_formula_path(formula_name) }
let(:formula_content) do
<<~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/utils_spec.rb | Library/Homebrew/test/utils_spec.rb | # frozen_string_literal: true
require "utils"
RSpec.describe Utils do
describe ".deconstantize" do
it "removes the rightmost segment from the constant expression in the string" do
expect(described_class.deconstantize("Net::HTTP")).to eq("Net")
expect(described_class.deconstantize("::Net::HTTP")).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/formatter_spec.rb | Library/Homebrew/test/formatter_spec.rb | # frozen_string_literal: true
require "utils/formatter"
require "utils/tty"
RSpec.describe Formatter do
describe "::columns" do
subject(:columns) { described_class.columns(input) }
let(:input) do
%w[
aa
bbb
ccc
dd
]
end
it "doesn't output columns if $std... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/formula_creator_spec.rb | Library/Homebrew/test/formula_creator_spec.rb | # frozen_string_literal: true
require "formula_creator"
RSpec.describe Homebrew::FormulaCreator do
describe ".new" do
tests = {
"generic tarball URL": {
url: "http://digit-labs.org/files/tools/synscan/releases/synscan-5.02.tar.gz",
expected_name: "synscan",
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/free_port_spec.rb | Library/Homebrew/test/free_port_spec.rb | # frozen_string_literal: true
require "socket"
require "formula_free_port"
RSpec.describe Homebrew::FreePort do
# Sorbet and rubocop-rspec disagree here.
# rubocop:disable RSpec/DescribedClass
include Homebrew::FreePort
# rubocop:enable RSpec/DescribedClass
describe "#free_port" do
it "returns a free T... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/compiler_selector_spec.rb | Library/Homebrew/test/compiler_selector_spec.rb | # frozen_string_literal: true
require "compilers"
require "software_spec"
RSpec.describe CompilerSelector do
subject(:selector) { described_class.new(software_spec, versions, compilers) }
let(:compilers) { [:clang, :gnu] }
let(:software_spec) { SoftwareSpec.new }
let(:cc) { :clang }
let(:versions) { 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/service_spec.rb | Library/Homebrew/test/service_spec.rb | # frozen_string_literal: true
require "formula"
require "service"
RSpec.describe Homebrew::Service do
let(:name) { "formula_name" }
def stub_formula(&block)
formula(name) do
url "https://brew.sh/test-1.0.tbz"
instance_eval(&block) if block
end
end
def stub_formula_with_service_sockets(s... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | true |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/abstract_command_spec.rb | Library/Homebrew/test/abstract_command_spec.rb | # frozen_string_literal: true
require "abstract_command"
RSpec.describe Homebrew::AbstractCommand do
describe "subclasses" do
before do
test_cat = Class.new(described_class) do
cmd_args do
description "test"
switch "--foo"
flag "--bar="
end
def run; en... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/bottle_spec.rb | Library/Homebrew/test/bottle_spec.rb | # frozen_string_literal: true
require "bottle_specification"
require "test/support/fixtures/testball_bottle"
RSpec.describe Bottle do
describe "#filename" do
it "renders the bottle filename" do
bottle_spec = BottleSpecification.new
bottle_spec.sha256(arm64_big_sur: "deadbeef" * 8)
tag = Utils:... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/software_spec_spec.rb | Library/Homebrew/test/software_spec_spec.rb | # frozen_string_literal: true
require "software_spec"
RSpec.describe SoftwareSpec do
alias_matcher :have_defined_resource, :be_resource_defined
alias_matcher :have_defined_option, :be_option_defined
subject(:spec) { described_class.new }
let(:owner) { instance_double(Cask::Cask, name: "some_name", full_name... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/settings_spec.rb | Library/Homebrew/test/settings_spec.rb | # frozen_string_literal: true
require "settings"
RSpec.describe Homebrew::Settings do
before do
HOMEBREW_REPOSITORY.cd do
system "git", "init"
end
end
def setup_setting
HOMEBREW_REPOSITORY.cd do
system "git", "config", "--replace-all", "homebrew.foo", "true"
end
end
describe ".... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/checksum_spec.rb | Library/Homebrew/test/checksum_spec.rb | # frozen_string_literal: true
require "checksum"
RSpec.describe Checksum do
describe "#empty?" do
subject { described_class.new("") }
it { is_expected.to be_empty }
end
describe "#==" do
subject { described_class.new(TEST_SHA256) }
let(:other) { described_class.new(TEST_SHA256) }
let(:oth... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/description_cache_store_spec.rb | Library/Homebrew/test/description_cache_store_spec.rb | # frozen_string_literal: true
require "cmd/update-report"
require "description_cache_store"
RSpec.describe DescriptionCacheStore do
subject(:cache_store) { described_class.new(database) }
let(:database) { instance_double(CacheStoreDatabase, "database") }
let(:formula_name) { "test_name" }
let(:description) {... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/commands_spec.rb | Library/Homebrew/test/commands_spec.rb | # frozen_string_literal: true
require "commands"
# These shared contexts starting with `when` don't make sense.
RSpec.shared_context "custom internal commands" do # rubocop:disable RSpec/ContextWording
let(:tmpdir) { mktmpdir }
let(:cmd_path) { tmpdir/"cmd" }
let(:dev_cmd_path) { tmpdir/"dev-cmd" }
let(:cmds)... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/rubocop_spec.rb | Library/Homebrew/test/rubocop_spec.rb | # frozen_string_literal: true
require "open3"
require "yaml"
RSpec.describe "RuboCop" do
context "when calling `rubocop` outside of the Homebrew environment" do
before do
ENV.each_key do |key|
allowlist = %w[
HOMEBREW_TESTS
HOMEBREW_USE_RUBY_FROM_PATH
HOMEBREW_BUNDLER... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/cxxstdlib_spec.rb | Library/Homebrew/test/cxxstdlib_spec.rb | # frozen_string_literal: true
require "formula"
require "cxxstdlib"
RSpec.describe CxxStdlib do
let(:clang) { described_class.create(:libstdcxx, :clang) }
let(:lcxx) { described_class.create(:libcxx, :clang) }
describe "#type_string" do
specify "formatting" do
expect(clang.type_string).to eq("libstdc... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/github_runner_spec.rb | Library/Homebrew/test/github_runner_spec.rb | # frozen_string_literal: true
require "github_runner"
RSpec.describe GitHubRunner do
let(:runner) do
spec = MacOSRunnerSpec.new(name: "macOS 11-arm64", runner: "11-arm64", timeout: 90, cleanup: true)
version = MacOSVersion.new("11")
described_class.new(platform: :macos, arch: :arm64, spec:, macos_versio... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/error_during_execution_spec.rb | Library/Homebrew/test/error_during_execution_spec.rb | # frozen_string_literal: true
RSpec.describe ErrorDuringExecution do
subject(:error) { described_class.new(command, status:, output:) }
let(:command) { ["false"] }
let(:status) { instance_double(Process::Status, exitstatus:, termsig: nil) }
let(:exitstatus) { 1 }
let(:output) { nil }
describe "#initializ... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/migrator_spec.rb | Library/Homebrew/test/migrator_spec.rb | # frozen_string_literal: true
require "migrator"
require "test/support/fixtures/testball"
require "tab"
require "keg"
RSpec.describe Migrator do
subject(:migrator) { described_class.new(new_formula, old_formula.name) }
let(:new_formula) { Testball.new("newname") }
let(:old_formula) { Testball.new("oldname") }
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/diagnostic_checks_spec.rb | Library/Homebrew/test/diagnostic_checks_spec.rb | # frozen_string_literal: true
require "diagnostic"
RSpec.describe Homebrew::Diagnostic::Checks do
subject(:checks) { described_class.new }
specify "#inject_file_list" do
expect(checks.inject_file_list([], "foo:\n")).to eq("foo:\n")
expect(checks.inject_file_list(%w[/a /b], "foo:\n")).to eq("foo:\n /a\n ... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/tap_spec.rb | Library/Homebrew/test/tap_spec.rb | # frozen_string_literal: true
RSpec.describe Tap do
include FileUtils
alias_matcher :have_cask_file, :be_cask_file
alias_matcher :have_formula_file, :be_formula_file
alias_matcher :have_custom_remote, :be_custom_remote
subject(:homebrew_foo_tap) { described_class.fetch("Homebrew", "foo") }
let(:path) { ... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/lock_file_spec.rb | Library/Homebrew/test/lock_file_spec.rb | # frozen_string_literal: true
require "lock_file"
RSpec.describe LockFile do
subject(:lock_file) { described_class.new(:lock, Pathname("foo")) }
let(:lock_file_copy) { described_class.new(:lock, Pathname("foo")) }
describe "#lock" do
it "ensures the lock file is created" do
expect(lock_file.path).no... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/missing_formula_spec.rb | Library/Homebrew/test/missing_formula_spec.rb | # frozen_string_literal: true
require "missing_formula"
RSpec.describe Homebrew::MissingFormula do
describe "::reason" do
subject { described_class.reason("gem") }
it { is_expected.not_to be_nil }
end
describe "::disallowed_reason" do
matcher :disallow do |name|
match do |expected|
e... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/messages_spec.rb | Library/Homebrew/test/messages_spec.rb | # frozen_string_literal: true
require "messages"
require "spec_helper"
RSpec.describe Messages do
let(:messages) { described_class.new }
let(:test_formula) { formula("foo") { url("https://brew.sh/foo-0.1.tgz") } }
let(:elapsed_time) { 1.1 }
describe "#record_caveats" do
it "adds a caveat" do
expect... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/global_spec.rb | Library/Homebrew/test/global_spec.rb | # frozen_string_literal: true
RSpec.describe Homebrew, :integration_test do
it "does not require slow dependencies at startup" do
expect { brew "verify-undefined" }
.to not_to_output.to_stdout
.and not_to_output.to_stderr
.and be_a_success
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/keg_only_reason_spec.rb | Library/Homebrew/test/keg_only_reason_spec.rb | # frozen_string_literal: true
require "keg_only_reason"
RSpec.describe KegOnlyReason do
describe "#to_s" do
it "returns the reason provided" do
r = described_class.new :provided_by_macos, "test"
expect(r.to_s).to eq("test")
end
it "returns a default message when no reason is provided" 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_version_spec.rb | Library/Homebrew/test/bundle_version_spec.rb | # frozen_string_literal: true
require "bundle_version"
RSpec.describe Homebrew::BundleVersion do
describe "#<=>" do
it "compares both the `short_version` and `version`" do
expect(described_class.new("1.2.3", "3000")).to be < described_class.new("1.2.3", "4000")
expect(described_class.new("1.2.3", "4... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/cleanup_spec.rb | Library/Homebrew/test/cleanup_spec.rb | # frozen_string_literal: true
require "test/support/fixtures/testball"
require "cleanup"
require "cask/cache"
require "fileutils"
RSpec.describe Homebrew::Cleanup do
subject(:cleanup) { described_class.new }
let(:ds_store) { Pathname.new("#{HOMEBREW_CELLAR}/.DS_Store") }
let(:lock_file) { Pathname.new("#{HOMEB... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/formula_installer_spec.rb | Library/Homebrew/test/formula_installer_spec.rb | # frozen_string_literal: true
require "formula"
require "formula_installer"
require "keg"
require "sandbox"
require "tab"
require "cmd/install"
require "test/support/fixtures/testball"
require "test/support/fixtures/testball_bottle"
require "test/support/fixtures/failball"
require "test/support/fixtures/failball_offli... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/lazy_object_spec.rb | Library/Homebrew/test/lazy_object_spec.rb | # frozen_string_literal: true
require "lazy_object"
RSpec.describe LazyObject do
describe "#initialize" do
it "does not evaluate the block" do
expect do |block|
described_class.new(&block)
end.not_to yield_control
end
end
describe "when receiving a message" do
it "evaluates the ... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/descriptions_spec.rb | Library/Homebrew/test/descriptions_spec.rb | # frozen_string_literal: true
require "descriptions"
RSpec.describe Descriptions do
subject(:descriptions) { described_class.new(descriptions_hash) }
let(:descriptions_hash) { {} }
it "can print description for a core Formula" do
descriptions_hash["homebrew/core/foo"] = "Core foo"
expect { description... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/bash_spec.rb | Library/Homebrew/test/bash_spec.rb | # frozen_string_literal: true
require "open3"
RSpec.describe "Bash" do
matcher :have_valid_bash_syntax do
match do |file|
stdout, stderr, status = Open3.capture3("/bin/bash", "-n", file)
@actual = [file, stderr]
stdout.empty? && status.success?
end
failure_message do |(file, stderr)... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/unpack_strategy_spec.rb | Library/Homebrew/test/unpack_strategy_spec.rb | # frozen_string_literal: true
RSpec.describe UnpackStrategy do
describe "#extract_nestedly" do
subject(:strategy) { described_class.detect(path) }
let(:unpack_dir) { mktmpdir }
context "when extracting a GZIP nested in a BZIP2" do
let(:file_name) { "file" }
let(:path) do
dir = mktmp... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/PATH_spec.rb | Library/Homebrew/test/PATH_spec.rb | # frozen_string_literal: true
require "PATH"
RSpec.describe PATH do
describe "#initialize" do
it "can take multiple arguments" do
expect(described_class.new("/path1", "/path2")).to eq("/path1:/path2")
end
it "can parse a mix of arrays and arguments" do
expect(described_class.new(["/path1", ... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/cache_store_spec.rb | Library/Homebrew/test/cache_store_spec.rb | # frozen_string_literal: true
require "cache_store"
RSpec.describe CacheStoreDatabase do
subject(:sample_db) { described_class.new(:sample) }
describe "self.use" do
let(:type) { :test }
it "creates a new `DatabaseCache` instance" do
cache_store = instance_double(described_class, "cache_store", wri... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/env_config_spec.rb | Library/Homebrew/test/env_config_spec.rb | # frozen_string_literal: true
require "diagnostic"
RSpec.describe Homebrew::EnvConfig do
subject(:env_config) { described_class }
describe "ENVS" do
it "sorts alphabetically" do
expect(env_config::ENVS.keys).to eql(env_config::ENVS.keys.sort)
end
end
describe ".env_method_name" do
it "gene... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/pkg_version_spec.rb | Library/Homebrew/test/pkg_version_spec.rb | # frozen_string_literal: true
require "pkg_version"
RSpec.describe PkgVersion do
describe "::parse" do
it "parses versions from a string" do
expect(described_class.parse("1.0_1")).to eq(described_class.new(Version.new("1.0"), 1))
expect(described_class.parse("1.0_1")).to eq(described_class.new(Versi... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/uninstall_spec.rb | Library/Homebrew/test/uninstall_spec.rb | # frozen_string_literal: true
require "uninstall"
RSpec.describe Homebrew::Uninstall do
let(:dependency) { formula("dependency") { url "f-1" } }
let(:dependent_formula) do
formula("dependent_formula") do
url "f-1"
depends_on "dependency"
end
end
let(:dependent_cask) do
Cask::CaskLoad... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/system_command_result_spec.rb | Library/Homebrew/test/system_command_result_spec.rb | # frozen_string_literal: true
require "system_command"
RSpec.describe SystemCommand::Result do
RSpec::Matchers.alias_matcher :a_string_containing, :include
subject(:result) do
described_class.new([], output_array, instance_double(Process::Status, exitstatus: 0, success?: true),
secret... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/dependency_expansion_spec.rb | Library/Homebrew/test/dependency_expansion_spec.rb | # frozen_string_literal: true
require "dependency"
RSpec.describe Dependency do
def build_dep(name, tags = [], deps = [])
dep = described_class.new(name.to_s, tags)
allow(dep).to receive(:to_formula).and_return \
instance_double(Formula, deps:, name:, full_name: name)
dep
end
let(:foo) { buil... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/build_environment_spec.rb | Library/Homebrew/test/build_environment_spec.rb | # frozen_string_literal: true
require "build_environment"
RSpec.describe BuildEnvironment do
let(:env) { described_class.new }
describe "#<<" do
it "returns itself" do
expect(env << :foo).to be env
end
end
describe "#merge" do
it "returns itself" do
expect(env.merge([])).to be env
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/dependencies_helpers_spec.rb | Library/Homebrew/test/dependencies_helpers_spec.rb | # frozen_string_literal: true
require "dependencies_helpers"
RSpec.describe DependenciesHelpers do
specify "#dependents" do
foo = formula "foo" do
url "foo"
version "1.0"
end
foo_cask = Cask::CaskLoader.load(+<<-RUBY)
cask "foo_cask" do
end
RUBY
bar = formula "bar" 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/resource_spec.rb | Library/Homebrew/test/resource_spec.rb | # frozen_string_literal: true
require "resource"
require "livecheck"
RSpec.describe Resource do
subject(:resource) { described_class.new("test") }
let(:livecheck_resource) do
described_class.new do
url "https://brew.sh/foo-1.0.tar.gz"
sha256 "0123456789abcdef0123456789abcdef0123456789abcdef012345... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/checksum_verification_spec.rb | Library/Homebrew/test/checksum_verification_spec.rb | # frozen_string_literal: true
require "formula"
RSpec.describe Formula do
def formula(&block)
super do
url "file://#{TEST_FIXTURE_DIR}/tarballs/testball-0.1.tbz"
instance_eval(&block)
end
end
describe "#brew" do
it "does not raise an error when the checksum matches" do
expect 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/spec_helper.rb | Library/Homebrew/test/spec_helper.rb | # frozen_string_literal: true
if ENV["HOMEBREW_TESTS_COVERAGE"]
require "simplecov"
require "simplecov-cobertura"
formatters = [
SimpleCov::Formatter::HTMLFormatter,
SimpleCov::Formatter::CoberturaFormatter,
]
SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new(formatters)
# Needed 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/formula_pin_spec.rb | Library/Homebrew/test/formula_pin_spec.rb | # frozen_string_literal: true
require "formula_pin"
RSpec.describe FormulaPin do
subject(:formula_pin) { described_class.new(formula) }
let(:name) { "double" }
let(:formula) { instance_double(Formula, name:, rack: HOMEBREW_CELLAR/name) }
before do
formula.rack.mkpath
allow(formula).to receive(:inst... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/sandbox_spec.rb | Library/Homebrew/test/sandbox_spec.rb | # frozen_string_literal: true
require "sandbox"
RSpec.describe Sandbox, :needs_macos do
define_negated_matcher :not_matching, :matching
subject(:sandbox) { described_class.new }
let(:dir) { mktmpdir }
let(:file) { dir/"foo" }
before do
skip "Sandbox not implemented." unless described_class.available?... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/options_spec.rb | Library/Homebrew/test/options_spec.rb | # frozen_string_literal: true
require "options"
RSpec.describe Options do
subject(:options) { described_class.new }
it "removes duplicate options" do
options << Option.new("foo")
options << Option.new("foo")
expect(options).to include("--foo")
expect(options.count).to eq(1)
end
it "preserves... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/test_bot/step_spec.rb | Library/Homebrew/test/test_bot/step_spec.rb | # frozen_string_literal: true
require "test_bot"
require "ostruct"
RSpec.describe Homebrew::TestBot::Step do
subject(:step) { described_class.new(command, env:, verbose:) }
let(:command) { ["brew", "config"] }
let(:env) { {} }
let(:verbose) { false }
describe "#run" do
it "runs the command" do
e... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/test_bot/setup_spec.rb | Library/Homebrew/test/test_bot/setup_spec.rb | # frozen_string_literal: true
require "test_bot"
require "ostruct"
RSpec.describe Homebrew::TestBot::Setup do
subject(:setup) { described_class.new }
describe "#run!" do
it "is successful" do
expect(setup).to receive(:test)
.exactly(3).times
.and_return(instance_double(Homebrew::TestBot... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/services/formula_wrapper_spec.rb | Library/Homebrew/test/services/formula_wrapper_spec.rb | # frozen_string_literal: true
require "services/system"
require "services/formula_wrapper"
require "tempfile"
RSpec.describe Homebrew::Services::FormulaWrapper do
subject(:service) { described_class.new(formula) }
let(:formula) do
instance_double(Formula,
name: "mysql",
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/services/formulae_spec.rb | Library/Homebrew/test/services/formulae_spec.rb | # frozen_string_literal: true
require "services/formulae"
RSpec.describe Homebrew::Services::Formulae do
describe "#services_list" do
it "empty list without available formulae" do
allow(described_class).to receive(:available_services).and_return({})
expect(described_class.services_list).to eq([])
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/services/cli_spec.rb | Library/Homebrew/test/services/cli_spec.rb | # frozen_string_literal: true
require "services/cli"
require "services/system"
require "services/formula_wrapper"
RSpec.describe Homebrew::Services::Cli do
subject(:services_cli) { described_class }
let(:service_string) { "service" }
describe "#bin" do
it "outputs command name" do
expect(services_cl... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/services/system_spec.rb | Library/Homebrew/test/services/system_spec.rb | # frozen_string_literal: true
require "services/system"
RSpec.describe Homebrew::Services::System do
describe "#launchctl" do
it "macOS - outputs launchctl command location", :needs_macos do
expect(described_class.launchctl).to eq(Pathname.new("/bin/launchctl"))
end
it "Other - outputs launchctl ... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/services/system/systemctl_spec.rb | Library/Homebrew/test/services/system/systemctl_spec.rb | # frozen_string_literal: true
require "services/system"
require "services/system/systemctl"
RSpec.describe Homebrew::Services::System::Systemctl do
describe ".scope" do
it "outputs systemctl scope for user" do
allow(Homebrew::Services::System).to receive(:root?).and_return(false)
expect(described_cl... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/services/commands/restart_spec.rb | Library/Homebrew/test/services/commands/restart_spec.rb | # frozen_string_literal: true
require "services/commands/restart"
RSpec.describe Homebrew::Services::Commands::Restart do
describe "#TRIGGERS" do
it "contains all restart triggers" do
expect(described_class::TRIGGERS).to eq(%w[restart relaunch reload r])
end
end
describe "#run" do
it "fails w... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/services/commands/list_spec.rb | Library/Homebrew/test/services/commands/list_spec.rb | # frozen_string_literal: true
require "services/commands/list"
RSpec.describe Homebrew::Services::Commands::List do
describe "#TRIGGERS" do
it "contains all restart triggers" do
expect(described_class::TRIGGERS).to eq([nil, "list", "ls"])
end
end
describe "#run" do
it "fails with empty list" ... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/services/commands/cleanup_spec.rb | Library/Homebrew/test/services/commands/cleanup_spec.rb | # frozen_string_literal: true
require "services/commands/cleanup"
require "services/system"
require "services/cli"
RSpec.describe Homebrew::Services::Commands::Cleanup do
describe "#TRIGGERS" do
it "contains all restart triggers" do
expect(described_class::TRIGGERS).to eq(%w[cleanup clean cl rm])
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/services/commands/info_spec.rb | Library/Homebrew/test/services/commands/info_spec.rb | # frozen_string_literal: true
require "services/commands/info"
RSpec.describe Homebrew::Services::Commands::Info do
before do
allow_any_instance_of(IO).to receive(:tty?).and_return(false)
end
describe "#TRIGGERS" do
it "contains all restart triggers" do
expect(described_class::TRIGGERS).to eq(%w[... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/support/quiet_progress_formatter.rb | Library/Homebrew/test/support/quiet_progress_formatter.rb | # typed: true
# frozen_string_literal: true
require "rspec/core/formatters/progress_formatter"
class QuietProgressFormatter < RSpec::Core::Formatters::ProgressFormatter
RSpec::Core::Formatters.register self, :seed
def dump_summary(notification); end
def seed(notification); end
def close(notification); end
en... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/support/fixtures/failball.rb | Library/Homebrew/test/support/fixtures/failball.rb | # typed: true
# frozen_string_literal: true
class Failball < Formula
def initialize(name = "failball", path = Pathname.new(__FILE__).expand_path, spec = :stable,
alias_path: nil, tap: nil, force_bottle: false)
super
end
DSL_PROC = proc do
url "file://#{TEST_FIXTURE_DIR}/tarballs/testbal... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/support/fixtures/testball_bottle.rb | Library/Homebrew/test/support/fixtures/testball_bottle.rb | # typed: true
# frozen_string_literal: true
class TestballBottle < Formula
def initialize(name = "testball_bottle", path = Pathname.new(__FILE__).expand_path, spec = :stable,
alias_path: nil, tap: nil, force_bottle: false)
super
end
DSL_PROC = proc do
url "file://#{TEST_FIXTURE_DIR}/tar... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/support/fixtures/testball.rb | Library/Homebrew/test/support/fixtures/testball.rb | # typed: true
# frozen_string_literal: true
class Testball < Formula
def initialize(name = "testball", path = Pathname.new(__FILE__).expand_path, spec = :stable,
alias_path: nil, tap: nil, force_bottle: false)
super
end
DSL_PROC = proc do
url "file://#{TEST_FIXTURE_DIR}/tarballs/testbal... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/support/fixtures/testball_bottle_cellar.rb | Library/Homebrew/test/support/fixtures/testball_bottle_cellar.rb | # typed: true
# frozen_string_literal: true
class TestballBottleCellar < Formula
def initialize(name = "testball_bottle", path = Pathname.new(__FILE__).expand_path, spec = :stable,
alias_path: nil, tap: nil, force_bottle: false)
super
end
DSL_PROC = proc do
url "file://#{TEST_FIXTURE_DI... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/support/fixtures/failball_offline_install.rb | Library/Homebrew/test/support/fixtures/failball_offline_install.rb | # typed: true
# frozen_string_literal: true
class FailballOfflineInstall < Formula
def initialize(name = "failball_offline_install", path = Pathname.new(__FILE__).expand_path, spec = :stable,
alias_path: nil, tap: nil, force_bottle: false)
super
end
DSL_PROC = proc do
url "file://#{TEST... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/support/fixtures/cask/Casks/auto-updates.rb | Library/Homebrew/test/support/fixtures/cask/Casks/auto-updates.rb | cask "auto-updates" do
version "2.61"
sha256 "5633c3a0f2e572cbf021507dec78c50998b398c343232bdfc7e26221d0a5db4d"
url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyApp.zip"
name "Auto-Updates"
desc "Cask which auto-updates"
homepage "https://brew.sh/MyFancyApp"
auto_updates true
app "MyFancyApp/MyFancyApp.ap... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/support/fixtures/cask/Casks/devmate-without-livecheck.rb | Library/Homebrew/test/support/fixtures/cask/Casks/devmate-without-livecheck.rb | cask "devmate-without-livecheck" do
version "1.0"
sha256 "a69e7357bea014f4c14ac9699274f559086844ffa46563c4619bf1addfd72ad9"
url "https://dl.devmate.com/com.my.fancyapp/app_#{version}.zip"
name "DevMate"
homepage "https://www.brew.sh/"
app "DevMate.app"
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/support/fixtures/cask/Casks/will-fail-if-upgraded.rb | Library/Homebrew/test/support/fixtures/cask/Casks/will-fail-if-upgraded.rb | cask "will-fail-if-upgraded" do
version "1.2.3"
sha256 "5e96aeb365aa8fabd51bb0d85f5f2bfe0135d392bb2f4120aa6b8171415906da"
url "file://#{TEST_FIXTURE_DIR}/cask/transmission-2.61.zip"
homepage "https://brew.sh/"
app "container"
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/support/fixtures/cask/Casks/sourceforge-with-livecheck.rb | Library/Homebrew/test/support/fixtures/cask/Casks/sourceforge-with-livecheck.rb | cask "sourceforge-with-livecheck" do
version "1.2.3"
url "https://downloads.sourceforge.net/something/Something-1.2.3.dmg"
homepage "https://sourceforge.net/projects/something/"
livecheck do
url "https://sourceforge.net/projects/something/rss"
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/support/fixtures/cask/Casks/pkg-without-uninstall.rb | Library/Homebrew/test/support/fixtures/cask/Casks/pkg-without-uninstall.rb | cask "pkg-without-uninstall" do
version "1.2.3"
sha256 "8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b"
url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip"
name "PKG without Uninstall"
desc "Cask with a package installer and no uninstall stanza"
homepage "https://brew.sh/fancy-pkg"
pk... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/support/fixtures/cask/Casks/test-opera-mail.rb | Library/Homebrew/test/support/fixtures/cask/Casks/test-opera-mail.rb | cask "test-opera-mail" do
version "1.0"
sha256 "afd192e308f8ea8ddb3d426fd6663d97078570417ee78b8e1fa15f515ae3d677"
url "https://get-ash-1.opera.com/pub/opera/mail/1.0/mac/Opera-Mail-1.0-1040.i386.dmg"
homepage "https://www.opera.com/computer/mail"
app "Opera Mail.app"
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/support/fixtures/cask/Casks/missing-homepage.rb | Library/Homebrew/test/support/fixtures/cask/Casks/missing-homepage.rb | cask "missing-homepage" do
version "1.2.3"
url "https://localhost/something.dmg"
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/support/fixtures/cask/Casks/generic-artifact-user-relative-target.rb | Library/Homebrew/test/support/fixtures/cask/Casks/generic-artifact-user-relative-target.rb | cask "generic-artifact-user-relative-target" do
version "1.2.3"
sha256 "d5b2dfbef7ea28c25f7a77cd7fa14d013d82b626db1d82e00e25822464ba19e2"
url "file://#{TEST_FIXTURE_DIR}/cask/AppWithBinary.zip"
name "With Binary"
desc "Cask with a binary stanza"
homepage "https://brew.sh/with-binary"
artifact "Caffeine.... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-signal-on-upgrade.rb | Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-signal-on-upgrade.rb | cask "with-uninstall-signal-on-upgrade" do
version "1.2.3"
sha256 "8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b"
url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip"
homepage "https://brew.sh/fancy-pkg"
pkg "MyFancyPkg/Fancy.pkg"
uninstall signal: [
["TERM", "my.fanc... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/support/fixtures/cask/Casks/many-renames.rb | Library/Homebrew/test/support/fixtures/cask/Casks/many-renames.rb | cask "many-renames" do
version "1.2.3"
sha256 "8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b"
url "file://#{TEST_FIXTURE_DIR}/cask/ManyArtifacts.zip"
homepage "https://brew.sh/many-artifacts"
rename "Foobar.app", "Foo.app"
rename "Foo.app", "Bar.app"
app "Bar.app"
preflight 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/support/fixtures/cask/Casks/with-uninstall-postflight.rb | Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-postflight.rb | cask "with-uninstall-postflight" do
version "1.2.3"
sha256 "8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b"
url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip"
homepage "https://brew.sh/fancy-pkg"
pkg "MyFancyPkg/Fancy.pkg"
uninstall_postflight do
# do nothing
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/support/fixtures/cask/Casks/with-postflight.rb | Library/Homebrew/test/support/fixtures/cask/Casks/with-postflight.rb | cask "with-postflight" do
version "1.2.3"
sha256 "8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b"
url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip"
homepage "https://brew.sh/fancy-pkg"
pkg "MyFancyPkg/Fancy.pkg"
postflight do
# do nothing
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/support/fixtures/cask/Casks/latest-with-livecheck.rb | Library/Homebrew/test/support/fixtures/cask/Casks/latest-with-livecheck.rb | cask "latest-with-livecheck" do
version :latest
sha256 :no_check
url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage "https://brew.sh/with-livecheck"
livecheck do
url "https://brew.sh/with-livecheck/changelog"
end
app "Caffeine.app"
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/support/fixtures/cask/Casks/appdir-interpolation.rb | Library/Homebrew/test/support/fixtures/cask/Casks/appdir-interpolation.rb | cask "appdir-interpolation" do
version "2.61"
sha256 "e44ffa103fbf83f55c8d0b1bea309a43b2880798dae8620b1ee8da5e1095ec68"
url "file://#{TEST_FIXTURE_DIR}/cask/transmission-2.61.dmg"
homepage "https://brew.sh/appdir-interpolation"
binary "#{appdir}/some/path"
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/support/fixtures/cask/Casks/version-latest-string.rb | Library/Homebrew/test/support/fixtures/cask/Casks/version-latest-string.rb | cask "version-latest-string" do
version "latest"
sha256 :no_check
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/support/fixtures/cask/Casks/many-artifacts.rb | Library/Homebrew/test/support/fixtures/cask/Casks/many-artifacts.rb | cask "many-artifacts" do
version "1.2.3"
sha256 "8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b"
url "file://#{TEST_FIXTURE_DIR}/cask/ManyArtifacts.zip"
homepage "https://brew.sh/many-artifacts"
app "ManyArtifacts/ManyArtifacts.app"
pkg "ManyArtifacts/ManyArtifacts.pkg"
preflight 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/support/fixtures/cask/Casks/with-depends-on-cask-multiple.rb | Library/Homebrew/test/support/fixtures/cask/Casks/with-depends-on-cask-multiple.rb | cask "with-depends-on-cask-multiple" do
version "1.2.3"
sha256 "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94"
url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage "https://brew.sh/with-depends-on-cask-multiple"
depends_on cask: "local-caffeine"
depends_on cask: "local-transmissi... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/support/fixtures/cask/Casks/hockeyapp-without-livecheck.rb | Library/Homebrew/test/support/fixtures/cask/Casks/hockeyapp-without-livecheck.rb | cask "hockeyapp-without-livecheck" do
version "1.0,123"
sha256 "a69e7357bea014f4c14ac9699274f559086844ffa46563c4619bf1addfd72ad9"
url "https://rink.hockeyapp.net/api/2/apps/67503a7926431872c4b6c1549f5bd6b1/app_versions/#{version.csv.second}?format=zip"
name "HockeyApp"
homepage "https://www.brew.sh/"
app ... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/support/fixtures/cask/Casks/with-installer-manual.rb | Library/Homebrew/test/support/fixtures/cask/Casks/with-installer-manual.rb | cask "with-installer-manual" do
version "1.2.3"
sha256 "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94"
url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
name "With Installer Manual"
desc "Cask with a manual installer"
homepage "https://brew.sh/"
installer manual: "Caffeine.app"
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/support/fixtures/cask/Casks/invalid-sha256.rb | Library/Homebrew/test/support/fixtures/cask/Casks/invalid-sha256.rb | cask "invalid-sha256" do
version "1.2.3"
sha256 "not a valid shasum"
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/support/fixtures/cask/Casks/container-xar.rb | Library/Homebrew/test/support/fixtures/cask/Casks/container-xar.rb | cask "container-xar" do
version "1.2.3"
sha256 "5bb8e09a6fc630ebeaf266b1fd2d15e2ae7d32d7e4da6668a8093426fa1ba509"
url "file://#{TEST_FIXTURE_DIR}/cask/container.xar"
homepage "https://brew.sh/container-xar"
app "container"
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/support/fixtures/cask/Casks/container-tar-gz.rb | Library/Homebrew/test/support/fixtures/cask/Casks/container-tar-gz.rb | cask "container-tar-gz" do
version "1.2.3"
sha256 "fab685fabf73d5a9382581ce8698fce9408f5feaa49fa10d9bc6c510493300f5"
url "file://#{TEST_FIXTURE_DIR}/cask/container.tar.gz"
homepage "https://brew.sh/container-tar-gz"
app "container"
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/support/fixtures/cask/Casks/with-uninstall-quit-on-upgrade.rb | Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-quit-on-upgrade.rb | cask "with-uninstall-quit-on-upgrade" do
version "1.2.3"
sha256 "8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b"
url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip"
homepage "https://brew.sh/fancy-pkg"
pkg "MyFancyPkg/Fancy.pkg"
uninstall quit: "my.fancy.package.app",
... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Homebrew/brew | https://github.com/Homebrew/brew/blob/fe0a384e3a04605192726c149570fbe33a8996b0/Library/Homebrew/test/support/fixtures/cask/Casks/with-depends-on-macos-symbol.rb | Library/Homebrew/test/support/fixtures/cask/Casks/with-depends-on-macos-symbol.rb | cask "with-depends-on-macos-symbol" do
version "1.2.3"
sha256 "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94"
url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage "https://brew.sh/with-depends-on-macos-symbol"
depends_on macos: MacOS.version.to_sym
app "Caffeine.app"
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/support/fixtures/cask/Casks/sha256-for-empty-string.rb | Library/Homebrew/test/support/fixtures/cask/Casks/sha256-for-empty-string.rb | cask "sha256-for-empty-string" do
version "1.2.3"
sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
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/support/fixtures/cask/Casks/missing-checksum.rb | Library/Homebrew/test/support/fixtures/cask/Casks/missing-checksum.rb | cask "missing-checksum" do
version "1.2.3"
url "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip"
homepage "https://brew.sh/"
app "Caffeine.app"
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/support/fixtures/cask/Casks/with-uninstall-launchctl.rb | Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-launchctl.rb | cask "with-uninstall-launchctl" do
version "1.2.3"
sha256 "8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b"
url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyApp.zip"
homepage "https://brew.sh/fancy"
app "Fancy.app"
uninstall launchctl: "my.fancy.package.service"
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/support/fixtures/cask/Casks/container-apfs-dmg.rb | Library/Homebrew/test/support/fixtures/cask/Casks/container-apfs-dmg.rb | cask "container-apfs-dmg" do
version "1.2.3"
sha256 "0630aa1145e8c3fa77aeb6ec414fee35204e90f224d6d06cb23e18a4d6112a5d"
url "file://#{TEST_FIXTURE_DIR}/cask/container-apfs.dmg"
homepage "https://brew.sh/container-apfs-dmg"
app "container"
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/support/fixtures/cask/Casks/with-uninstall-early-script.rb | Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-early-script.rb | cask "with-uninstall-early-script" do
version "1.2.3"
sha256 "8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b"
url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyPkg.zip"
homepage "https://brew.sh/fancy-pkg"
pkg "MyFancyPkg/Fancy.pkg"
uninstall early_script: { executable: "MyFancyPkg/FancyUnins... | ruby | BSD-2-Clause | fe0a384e3a04605192726c149570fbe33a8996b0 | 2026-01-04T15:37:27.366412Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.