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
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cmd/analytics_spec.rb
Library/Homebrew/test/cmd/analytics_spec.rb
describe "brew analytics", :integration_test do before do HOMEBREW_REPOSITORY.cd do system "git", "init" end end it "is disabled when HOMEBREW_NO_ANALYTICS is set" do expect { brew "analytics", "HOMEBREW_NO_ANALYTICS" => "1" } .to output(/Analytics is disabled \(by HOMEBREW_NO_ANALYTICS\)...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cmd/unpack_spec.rb
Library/Homebrew/test/cmd/unpack_spec.rb
describe "brew unpack", :integration_test do it "unpacks a given Formula's archive" do setup_test_formula "testball" mktmpdir do |path| expect { brew "unpack", "testball", "--destdir=#{path}" } .to be_a_success expect(path/"testball-0.1").to be_a_directory end end end
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cmd/tap-new_spec.rb
Library/Homebrew/test/cmd/tap-new_spec.rb
describe "brew tap-new", :integration_test do it "initializes a new Tap with a ReadMe file" do expect { brew "tap-new", "homebrew/foo", "--verbose" } .to be_a_success .and not_to_output.to_stdout .and not_to_output.to_stderr expect(HOMEBREW_LIBRARY/"Taps/homebrew/homebrew-foo/README.md").to...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cmd/leaves_spec.rb
Library/Homebrew/test/cmd/leaves_spec.rb
describe "brew leaves", :integration_test do it "prints all Formulae that are not dependencies of other Formulae" do setup_test_formula "foo" setup_test_formula "bar" expect { brew "leaves" } .to be_a_success .and not_to_output.to_stdout .and not_to_output.to_stderr (HOMEBREW_CELLA...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cmd/switch_spec.rb
Library/Homebrew/test/cmd/switch_spec.rb
describe "brew switch", :integration_test do it "allows switching between Formula versions" do setup_test_formula "testball", <<~RUBY keg_only "just because" RUBY expect { brew "install", "testball" }.to be_a_success testball_rack = HOMEBREW_CELLAR/"testball" FileUtils.cp_r testball_rack/"...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cmd/--cellar_spec.rb
Library/Homebrew/test/cmd/--cellar_spec.rb
describe "brew --cellar", :integration_test do it "print the location of Homebrew's Cellar when no argument is given" do expect { brew "--cellar" } .to output("#{HOMEBREW_CELLAR}\n").to_stdout .and not_to_output.to_stderr .and be_a_success end it "returns the Cellar subdirectory for a given...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cmd/configure-shell.rb
Library/Homebrew/test/cmd/configure-shell.rb
describe "brew configure-shell", :integration_test do # Put everything in a temp dir that will be used as $HOME so that ~/.profile does not refer to a real ~/.profile let!(:testing_path) { mktmpdir } # Put all of the paths of files that can be affected into variables to make the rest of this code cleaner let(:b...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cmd/uses_spec.rb
Library/Homebrew/test/cmd/uses_spec.rb
describe "brew uses", :integration_test do it "prints the Formulae a given Formula is used by" do setup_test_formula "foo" setup_test_formula "bar" setup_test_formula "baz", <<~RUBY url "https://brew.sh/baz-1.0" depends_on "bar" RUBY expect { brew "uses", "baz" } .to be_a_succes...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cmd/reinstall_spec.rb
Library/Homebrew/test/cmd/reinstall_spec.rb
require "extend/ENV" describe "brew reinstall", :integration_test do before do setup_test_formula "testball" expect { brew "install", "testball", "--with-foo" }.to be_a_success end it "reinstalls a Formula" do foo_dir = HOMEBREW_CELLAR/"testball/0.1/foo" expect(foo_dir).to exist foo_dir.rmt...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cmd/command_spec.rb
Library/Homebrew/test/cmd/command_spec.rb
describe "brew command", :integration_test do it "returns the file for a given command" do expect { brew "command", "info" } .to output(%r{#{Regexp.escape(HOMEBREW_LIBRARY_PATH)}/cmd/info.rb}).to_stdout .and be_a_success end end
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cmd/services_spec.rb
Library/Homebrew/test/cmd/services_spec.rb
describe "brew services", :integration_test, :needs_macos, :needs_network do it "allows controlling services" do setup_remote_tap "homebrew/services" expect { brew "services", "list" } .to output("Warning: No services available to control with `brew services`\n").to_stderr .and not_to_output.to_s...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cmd/fetch_spec.rb
Library/Homebrew/test/cmd/fetch_spec.rb
describe "brew fetch", :integration_test do it "downloads the Formula's URL" do setup_test_formula "testball" expect { brew "fetch", "testball" }.to be_a_success expect(HOMEBREW_CACHE/"testball--0.1.tbz").to be_a_symlink expect(HOMEBREW_CACHE/"testball--0.1.tbz").to exist end end
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cmd/upgrade_spec.rb
Library/Homebrew/test/cmd/upgrade_spec.rb
describe "brew upgrade", :integration_test do it "upgrades a Formula to the latest version" do setup_test_formula "testball" (HOMEBREW_CELLAR/"testball/0.0.1/foo").mkpath expect { brew "upgrade" }.to be_a_success expect(HOMEBREW_CELLAR/"testball/0.1").to be_a_directory end it "upgrades a Formul...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cmd/commands_spec.rb
Library/Homebrew/test/cmd/commands_spec.rb
require "cmd/command" require "cmd/commands" require "fileutils" describe "brew commands", :integration_test do it "prints a list of all available commands" do expect { brew "commands" } .to output(/Built-in commands/).to_stdout .and not_to_output.to_stderr .and be_a_success end it "prints...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cmd/list_spec.rb
Library/Homebrew/test/cmd/list_spec.rb
describe "brew list", :integration_test do let(:formulae) { %w[bar foo qux] } it "prints all installed Formulae" do formulae.each do |f| (HOMEBREW_CELLAR/f/"1.0/somedir").mkpath end expect { brew "list" } .to output("#{formulae.join("\n")}\n").to_stdout .and not_to_output.to_stderr ...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cmd/link_spec.rb
Library/Homebrew/test/cmd/link_spec.rb
describe "brew link", :integration_test do it "does not fail if the given Formula is already linked" do setup_test_formula "testball1" expect { brew "install", "testball1" }.to be_a_success expect { brew "link", "testball1" }.to be_a_success end it "links a given Formula" do setup_test_formula "...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cmd/help_spec.rb
Library/Homebrew/test/cmd/help_spec.rb
describe "brew", :integration_test do it "prints help when no argument is given" do expect { brew } .to output(/Example usage:\n/).to_stderr .and be_a_failure end describe "help" do it "prints help" do expect { brew "help" } .to output(/Example usage:\n/).to_stdout .and ...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cmd/custom-external-command_spec.rb
Library/Homebrew/test/cmd/custom-external-command_spec.rb
describe "brew custom-external-command", :integration_test do it "is supported" do mktmpdir do |path| cmd = "custom-external-command-#{rand}" file = path/"brew-#{cmd}" file.write <<~SH #!/bin/sh echo 'I am #{cmd}.' SH FileUtils.chmod "+x", file expect { brew c...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cmd/cleanup_spec.rb
Library/Homebrew/test/cmd/cleanup_spec.rb
describe "brew cleanup", :integration_test do describe "--prune=all" do it "removes all files in Homebrew's cache" do (HOMEBREW_CACHE/"test").write "test" expect { brew "cleanup", "--prune=all" } .to output(%r{#{Regexp.escape(HOMEBREW_CACHE)}/test}).to_stdout .and not_to_output.to_std...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cmd/readall_spec.rb
Library/Homebrew/test/cmd/readall_spec.rb
describe "brew readall", :integration_test do it "imports all Formulae for a given Tap" do formula_file = setup_test_formula "testball" alias_file = CoreTap.new.alias_dir/"foobar" alias_file.parent.mkpath FileUtils.ln_s formula_file, alias_file expect { brew "readall", "--aliases", "--syntax" }...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cmd/--env_spec.rb
Library/Homebrew/test/cmd/--env_spec.rb
describe "brew --env", :integration_test do it "prints the Homebrew build environment variables" do expect { brew "--env" } .to output(/CMAKE_PREFIX_PATH="#{Regexp.escape(HOMEBREW_PREFIX)}[:"]/).to_stdout .and not_to_output.to_stderr .and be_a_success end describe "--shell=bash" do it "...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cmd/cat_spec.rb
Library/Homebrew/test/cmd/cat_spec.rb
describe "brew cat", :integration_test do it "prints the content of a given Formula" do formula_file = setup_test_formula "testball" content = formula_file.read expect { brew "cat", "testball" } .to output(content).to_stdout .and not_to_output.to_stderr .and be_a_success end it "fa...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cmd/uninstall_spec.rb
Library/Homebrew/test/cmd/uninstall_spec.rb
require "cmd/uninstall" describe "brew uninstall", :integration_test do it "uninstalls a given Formula" do expect { brew "install", testball }.to be_a_success expect { brew "uninstall", "--force", testball } .to output(/Uninstalling testball/).to_stdout .and not_to_output.to_stderr .and be...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cmd/log_spec.rb
Library/Homebrew/test/cmd/log_spec.rb
describe "brew log", :integration_test do it "shows the Git log for the Homebrew repository when no argument is given" do HOMEBREW_REPOSITORY.cd do system "git", "init" system "git", "commit", "--allow-empty", "-m", "This is a test commit" end expect { brew "log" } .to output(/This is a...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cmd/config_spec.rb
Library/Homebrew/test/cmd/config_spec.rb
describe "brew config", :integration_test do it "prints information about the current Homebrew configuration" do expect { brew "config" } .to output(/HOMEBREW_VERSION: #{Regexp.escape HOMEBREW_VERSION}/).to_stdout .and not_to_output.to_stderr .and be_a_success end end
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cmd/outdated_spec.rb
Library/Homebrew/test/cmd/outdated_spec.rb
describe "brew outdated", :integration_test do context "quiet output" do it "prints outdated Formulae" do setup_test_formula "testball" (HOMEBREW_CELLAR/"testball/0.0.1/foo").mkpath setup_test_formula "foo" (HOMEBREW_CELLAR/"foo/0.0.1/foo").mkpath expect { brew "outdated" } ...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cmd/unlink_spec.rb
Library/Homebrew/test/cmd/unlink_spec.rb
describe "brew unlink", :integration_test do it "unlinks a Formula" do setup_test_formula "testball" expect { brew "install", "testball" }.to be_a_success expect { brew "unlink", "--dry-run", "testball" } .to output(/Would remove/).to_stdout .and not_to_output.to_stderr .and be_a_succe...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cmd/info_spec.rb
Library/Homebrew/test/cmd/info_spec.rb
require "cmd/info" describe "brew info", :integration_test do before do setup_test_formula "testball" end it "prints information about a given Formula" do expect { brew "info", "testball" } .to output(/testball: stable 0.1/).to_stdout .and not_to_output.to_stderr .and be_a_success en...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cmd/home_spec.rb
Library/Homebrew/test/cmd/home_spec.rb
describe "brew home", :integration_test do it "opens the Homebrew homepage when no argument is given" do expect { brew "home", "HOMEBREW_BROWSER" => "echo" } .to output("#{HOMEBREW_WWW}\n").to_stdout .and not_to_output.to_stderr .and be_a_success end it "opens the homepage for a given Formu...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cmd/missing_spec.rb
Library/Homebrew/test/cmd/missing_spec.rb
describe "brew missing", :integration_test do before do setup_test_formula "foo" setup_test_formula "bar" end def make_prefix(name) (HOMEBREW_CELLAR/name/"1.0").mkpath end it "prints missing dependencies" do make_prefix "bar" expect { brew "missing" } .to output("foo\n").to_stdout...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cmd/options_spec.rb
Library/Homebrew/test/cmd/options_spec.rb
describe "brew options", :integration_test do it "prints a given Formula's options" do setup_test_formula "testball", <<~RUBY depends_on "bar" => :recommended RUBY expect { brew "options", "testball" } .to output("--with-foo\n\tBuild with foo\n--without-bar\n\tBuild without bar support\n\n")....
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cmd/update-report/reporter_spec.rb
Library/Homebrew/test/cmd/update-report/reporter_spec.rb
require "cmd/update-report" require "formula_versions" require "yaml" describe Reporter do def perform_update(fixture_name = "") allow(Formulary).to receive(:factory).and_return(double(pkg_version: "1.0")) allow(FormulaVersions).to receive(:new).and_return(double(formula_at_revision: "2.0")) diff = YAML...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/dev-cmd/ruby_spec.rb
Library/Homebrew/test/dev-cmd/ruby_spec.rb
describe "brew ruby", :integration_test do it "executes ruby code with Homebrew's libraries loaded" do expect { brew "ruby", "-e", "exit 0" } .to be_a_success .and not_to_output.to_stdout .and not_to_output.to_stderr end end
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/dev-cmd/linkage_spec.rb
Library/Homebrew/test/dev-cmd/linkage_spec.rb
describe "brew linkage", :integration_test do before do setup_test_formula "testball" (HOMEBREW_CELLAR/"testball/0.0.1/foo").mkpath end it "works when no arguments are provided" do expect { brew "linkage" } .to be_a_success .and not_to_output.to_stdout .and not_to_output.to_stderr ...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/dev-cmd/create_spec.rb
Library/Homebrew/test/dev-cmd/create_spec.rb
describe "brew create", :integration_test do let(:url) { "file://#{TEST_FIXTURE_DIR}/tarballs/testball-0.1.tbz" } let(:formula_file) { CoreTap.new.formula_dir/"testball.rb" } it "creates a new Formula file for a given URL" do brew "create", url, "HOMEBREW_EDITOR" => "/bin/cat" expect(formula_file).to ex...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/dev-cmd/pull_spec.rb
Library/Homebrew/test/dev-cmd/pull_spec.rb
describe "brew pull", :integration_test do it "fetches a patch from a GitHub commit or pull request and applies it", :needs_network do CoreTap.instance.path.cd do system "git", "init" system "git", "checkout", "-b", "new-branch" end expect { brew "pull", "https://jenkins.brew.sh/job/Homebrew\...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/dev-cmd/formula_spec.rb
Library/Homebrew/test/dev-cmd/formula_spec.rb
describe "brew formula", :integration_test do it "prints a given Formula's path" do formula_file = setup_test_formula "testball" expect { brew "formula", "testball" } .to output("#{formula_file}\n").to_stdout .and not_to_output.to_stderr .and be_a_success end end
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/dev-cmd/bottle_spec.rb
Library/Homebrew/test/dev-cmd/bottle_spec.rb
describe "brew bottle", :integration_test do it "builds a bottle for the given Formula" do begin expect { brew "install", "--build-bottle", testball } .to be_a_success setup_test_formula "patchelf" (HOMEBREW_CELLAR/"patchelf/1.0/bin").mkpath expect { brew "bottle", "--no-rebuild"...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/dev-cmd/audit_spec.rb
Library/Homebrew/test/dev-cmd/audit_spec.rb
require "dev-cmd/audit" require "formulary" module Count def self.increment @count ||= 0 @count += 1 end end module Homebrew describe FormulaText do alias_matcher :have_data, :be_data alias_matcher :have_end, :be_end alias_matcher :have_trailing_newline, :be_trailing_newline let(:dir) {...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/dev-cmd/extract_spec.rb
Library/Homebrew/test/dev-cmd/extract_spec.rb
describe "brew extract", :integration_test do it "retrieves the specified version of formula, defaulting to most recent" do path = Tap::TAP_DIRECTORY/"homebrew/homebrew-foo" (path/"Formula").mkpath target = Tap.from_path(path) core_tap = CoreTap.new core_tap.path.cd do system "git", "init" ...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/dev-cmd/tap_spec.rb
Library/Homebrew/test/dev-cmd/tap_spec.rb
describe "brew tap", :integration_test do it "taps a given Tap" do path = Tap::TAP_DIRECTORY/"homebrew/homebrew-foo" path.mkpath path.cd do system "git", "init" system "git", "remote", "add", "origin", "https://github.com/Homebrew/homebrew-foo" FileUtils.touch "readme" system "git"...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/dev-cmd/edit_spec.rb
Library/Homebrew/test/dev-cmd/edit_spec.rb
describe "brew edit", :integration_test do it "opens a given Formula in an editor" do HOMEBREW_REPOSITORY.cd do system "git", "init" end setup_test_formula "testball" expect { brew "edit", "testball", "HOMEBREW_EDITOR" => "/bin/cat" } .to output(/# something here/).to_stdout .and n...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/dev-cmd/test_spec.rb
Library/Homebrew/test/dev-cmd/test_spec.rb
describe "brew test", :integration_test do it "tests a given Formula" do setup_test_formula "testball", <<~RUBY head "https://github.com/example/testball2.git" devel do url "file://#{TEST_FIXTURE_DIR}/tarballs/testball-0.1.tbz" sha256 "#{TESTBALL_SHA256}" end keg_only "ju...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/hardware/cpu_spec.rb
Library/Homebrew/test/hardware/cpu_spec.rb
require "hardware" describe Hardware::CPU do describe "::type" do let(:cpu_types) { [ :intel, :ppc, :dunno, ] } it "returns the current CPU's type as a symbol, or :dunno if it cannot be detected" do expect(cpu_types).to include(described_class.type) end en...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/macos_spec.rb
Library/Homebrew/test/cask/macos_spec.rb
describe MacOS, :cask do it "says '/' is undeletable" do expect(MacOS).to be_undeletable( "/", ) expect(MacOS).to be_undeletable( "/.", ) expect(MacOS).to be_undeletable( "/usr/local/Library/Taps/../../../..", ) end it "says '/Applications' is undeletable" do expect(...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/quarantine_spec.rb
Library/Homebrew/test/cask/quarantine_spec.rb
describe Cask::Quarantine, :cask do matcher :be_quarantined do match do |path| expect( described_class.detect(path), ).to be true end end describe "by default" do it "quarantines a nice fresh Cask" do Cask::Cmd::Install.run("local-transmission") expect( Cask::...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/conflicts_with_spec.rb
Library/Homebrew/test/cask/conflicts_with_spec.rb
describe "conflicts_with", :cask do describe "conflicts_with cask" do let(:local_caffeine) { Cask::CaskLoader.load(cask_path("local-caffeine")) } let(:with_conflicts_with) { Cask::CaskLoader.load(cask_path("with-conflicts-with")) } it "installs the dependency of a Cask and the Cask i...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/cask_spec.rb
Library/Homebrew/test/cask/cask_spec.rb
describe Cask::Cask, :cask do let(:cask) { described_class.new("versioned-cask") } context "when multiple versions are installed" do describe "#versions" do context "and there are duplicate versions" do it "uses the last unique version" do allow(cask).to receive(:timestamped_versions).a...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/dsl_spec.rb
Library/Homebrew/test/cask/dsl_spec.rb
describe Cask::DSL, :cask do let(:cask) { Cask::CaskLoader.load(cask_path(token.to_s)) } let(:token) { "basic-cask" } context "stanzas" do it "lets you set url, homepage, and version" do expect(cask.url.to_s).to eq("https://brew.sh/TestCask.dmg") expect(cask.homepage).to eq("https://brew.sh/") ...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/verify_spec.rb
Library/Homebrew/test/cask/verify_spec.rb
module Cask describe Verify, :cask do describe "::all" do subject(:verification) { described_class.all(cask, downloaded_path) } let(:cask) { instance_double(Cask, token: "cask", sha256: expected_sha256) } let(:cafebabe) { "cafebabecafebabecafebabecafebabecafebabecafebabecafebabecafebabe" } ...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/audit_spec.rb
Library/Homebrew/test/cask/audit_spec.rb
describe Cask::Audit, :cask do def include_msg?(messages, msg) if msg.is_a?(Regexp) Array(messages).any? { |m| m =~ msg } else Array(messages).include?(msg) end end matcher :pass do match do |audit| !audit.errors? && !audit.warnings? end end matcher :fail do match(&...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/pkg_spec.rb
Library/Homebrew/test/cask/pkg_spec.rb
describe Cask::Pkg, :cask do describe "#uninstall" do let(:fake_system_command) { NeverSudoSystemCommand } let(:empty_response) { double(stdout: "", plist: { "volume" => "/", "install-location" => "", "paths" => {} }) } let(:pkg) { described_class.new("my.fake.pkg", fake_system_command) } it "removes...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/depends_on_spec.rb
Library/Homebrew/test/cask/depends_on_spec.rb
# TODO: this test should be named after the corresponding class, once # that class is abstracted from installer.rb describe "Satisfy Dependencies and Requirements", :cask do subject { lambda do Cask::Installer.new(cask).install end } describe "depends_on cask" do context "when depends_on ...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/installer_spec.rb
Library/Homebrew/test/cask/installer_spec.rb
describe Cask::Installer, :cask do describe "install" do let(:empty_depends_on_stub) { double(formula: [], cask: [], macos: nil, arch: nil, x11: nil) } it "downloads and installs a nice fresh Cask" do caffeine = Cask::CaskLoader.load(cask_path("local-caffeine")) Cask::Installer.new(caf...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/cmd_spec.rb
Library/Homebrew/test/cask/cmd_spec.rb
describe Cask::Cmd, :cask do it "lists the taps for Casks that show up in two taps" do listing = described_class.nice_listing(%w[ homebrew/cask/adium homebrew/cask/google-chrome p...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/cmd/internal_stanza_spec.rb
Library/Homebrew/test/cask/cmd/internal_stanza_spec.rb
describe Cask::Cmd::InternalStanza, :cask do it "shows stanza of the Specified Cask" do command = described_class.new("homepage", "local-caffeine") expect { command.run }.to output("https://brew.sh\n").to_stdout end it "raises an exception when stanza is unknown/unsupported" do expect { ...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/cmd/zap_spec.rb
Library/Homebrew/test/cask/cmd/zap_spec.rb
require_relative "shared_examples/requires_cask_token" require_relative "shared_examples/invalid_option" describe Cask::Cmd::Zap, :cask do it_behaves_like "a command that requires a Cask token" it_behaves_like "a command that handles invalid options" it "shows an error when a bad Cask is provided" do expect...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/cmd/doctor_spec.rb
Library/Homebrew/test/cask/cmd/doctor_spec.rb
require_relative "shared_examples/invalid_option" describe Cask::Cmd::Doctor, :cask do it_behaves_like "a command that handles invalid options" it "displays some nice info about the environment" do expect { described_class.run }.to output(/^==> Homebrew Version/).to_stdout end it "raises an exc...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/cmd/install_spec.rb
Library/Homebrew/test/cask/cmd/install_spec.rb
require_relative "shared_examples/requires_cask_token" require_relative "shared_examples/invalid_option" describe Cask::Cmd::Install, :cask do it_behaves_like "a command that requires a Cask token" it_behaves_like "a command that handles invalid options" it "displays the installation progress" do output = R...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/cmd/style_spec.rb
Library/Homebrew/test/cask/cmd/style_spec.rb
require "open3" require "rubygems" require_relative "shared_examples/invalid_option" describe Cask::Cmd::Style, :cask do let(:args) { [] } let(:cli) { described_class.new(*args) } it_behaves_like "a command that handles invalid options" describe "#run" do subject { cli.run } before do allow(c...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/cmd/create_spec.rb
Library/Homebrew/test/cask/cmd/create_spec.rb
require_relative "shared_examples/requires_cask_token" require_relative "shared_examples/invalid_option" describe Cask::Cmd::Create, :cask do around do |example| begin example.run ensure %w[new-cask additional-cask another-cask yet-another-cask local-caff].each do |cask| FileUtils.rm_f Ca...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/cmd/reinstall_spec.rb
Library/Homebrew/test/cask/cmd/reinstall_spec.rb
require_relative "shared_examples/invalid_option" describe Cask::Cmd::Reinstall, :cask do it_behaves_like "a command that handles invalid options" it "displays the reinstallation progress" do caffeine = Cask::CaskLoader.load(cask_path("local-caffeine")) Cask::Installer.new(caffeine).install output =...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/cmd/audit_spec.rb
Library/Homebrew/test/cask/cmd/audit_spec.rb
require_relative "shared_examples/invalid_option" describe Cask::Cmd::Audit, :cask do let(:cask) { Cask::Cask.new(nil) } it_behaves_like "a command that handles invalid options" describe "selection of Casks to audit" do it "audits all Casks if no tokens are given" do allow(Cask::Cask).to receive(:to_...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/cmd/fetch_spec.rb
Library/Homebrew/test/cask/cmd/fetch_spec.rb
require_relative "shared_examples/requires_cask_token" require_relative "shared_examples/invalid_option" describe Cask::Cmd::Fetch, :cask do let(:local_transmission) { Cask::CaskLoader.load(cask_path("local-transmission")) } let(:local_caffeine) { Cask::CaskLoader.load(cask_path("local-caffeine")) } ...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/cmd/upgrade_spec.rb
Library/Homebrew/test/cask/cmd/upgrade_spec.rb
require_relative "shared_examples/invalid_option" describe Cask::Cmd::Upgrade, :cask do it_behaves_like "a command that handles invalid options" context "successful upgrade" do let(:installed) { [ "outdated/local-caffeine", "outdated/local-transmission", "outdated/auto-updates", ...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/cmd/list_spec.rb
Library/Homebrew/test/cask/cmd/list_spec.rb
require_relative "shared_examples/invalid_option" describe Cask::Cmd::List, :cask do it_behaves_like "a command that handles invalid options" it "lists the installed Casks in a pretty fashion" do casks = %w[local-caffeine local-transmission].map { |c| Cask::CaskLoader.load(c) } casks.each do |c| In...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/cmd/edit_spec.rb
Library/Homebrew/test/cask/cmd/edit_spec.rb
require_relative "shared_examples/requires_cask_token" require_relative "shared_examples/invalid_option" describe Cask::Cmd::Edit, :cask do before do allow_any_instance_of(described_class).to receive(:exec_editor) end it_behaves_like "a command that requires a Cask token" it_behaves_like "a command that h...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/cmd/cat_spec.rb
Library/Homebrew/test/cask/cmd/cat_spec.rb
require_relative "shared_examples/requires_cask_token" require_relative "shared_examples/invalid_option" describe Cask::Cmd::Cat, :cask do it_behaves_like "a command that requires a Cask token" it_behaves_like "a command that handles invalid options" describe "given a basic Cask" do let(:basic_cask_content)...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/cmd/uninstall_spec.rb
Library/Homebrew/test/cask/cmd/uninstall_spec.rb
require_relative "shared_examples/requires_cask_token" require_relative "shared_examples/invalid_option" describe Cask::Cmd::Uninstall, :cask do it_behaves_like "a command that requires a Cask token" it_behaves_like "a command that handles invalid options" it "displays the uninstallation progress" do caffei...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/cmd/outdated_spec.rb
Library/Homebrew/test/cask/cmd/outdated_spec.rb
require_relative "shared_examples/invalid_option" describe Cask::Cmd::Outdated, :cask do let(:installed) do [ Cask::CaskLoader.load(cask_path("basic-cask")), Cask::CaskLoader.load(cask_path("outdated/local-caffeine")), Cask::CaskLoader.load(cask_path("outdated/local-transmission")), Cask:...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/cmd/info_spec.rb
Library/Homebrew/test/cask/cmd/info_spec.rb
require_relative "shared_examples/requires_cask_token" require_relative "shared_examples/invalid_option" describe Cask::Cmd::Info, :cask do it_behaves_like "a command that requires a Cask token" it_behaves_like "a command that handles invalid options" it "displays some nice info about the specified Cask" do ...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/cmd/home_spec.rb
Library/Homebrew/test/cask/cmd/home_spec.rb
require_relative "shared_examples/invalid_option" describe Cask::Cmd::Home, :cask do before do allow(described_class).to receive(:open_url) end it_behaves_like "a command that handles invalid options" it "opens the homepage for the specified Cask" do expect(described_class).to receive(:open_url).with...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/cmd/options_spec.rb
Library/Homebrew/test/cask/cmd/options_spec.rb
describe Cask::Cmd, :cask do it "supports setting the appdir" do allow(Cask::Config.global).to receive(:appdir).and_call_original described_class.new.process_options("help", "--appdir=/some/path/foo") expect(Cask::Config.global.appdir).to eq(Pathname.new("/some/path/foo")) end it "supports setting ...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/cmd/shared_examples/invalid_option.rb
Library/Homebrew/test/cask/cmd/shared_examples/invalid_option.rb
shared_examples "a command that handles invalid options" do context "when an invalid option is specified" do it "raises an exception when no Cask is specified" do expect { described_class.run("--not-a-valid-option") }.to raise_error("invalid option: --not-a-valid-option") end it "rais...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/cmd/shared_examples/requires_cask_token.rb
Library/Homebrew/test/cask/cmd/shared_examples/requires_cask_token.rb
shared_examples "a command that requires a Cask token" do context "when no Cask is specified" do it "raises an exception " do expect { described_class.run }.to raise_error(Cask::CaskUnspecifiedError, "This command requires a Cask token.") end end end
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/dsl/uninstall_preflight_spec.rb
Library/Homebrew/test/cask/dsl/uninstall_preflight_spec.rb
require "test/cask/dsl/shared_examples/base" require "test/cask/dsl/shared_examples/staged" describe Cask::DSL::UninstallPreflight, :cask do let(:cask) { Cask::CaskLoader.load(cask_path("basic-cask")) } let(:dsl) { Cask::DSL::UninstallPreflight.new(cask, FakeSystemCommand) } it_behaves_like Cask::DSL::Base i...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/dsl/version_spec.rb
Library/Homebrew/test/cask/dsl/version_spec.rb
describe Cask::DSL::Version, :cask do shared_examples "expectations hash" do |input_name, expectations| expectations.each do |input_value, expected_output| context "when #{input_name} is #{input_value.inspect}" do let(input_name.to_sym) { input_value } it { is_expected.to eq expected_output...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/dsl/caveats_spec.rb
Library/Homebrew/test/cask/dsl/caveats_spec.rb
require "test/cask/dsl/shared_examples/base" describe Cask::DSL::Caveats, :cask do let(:cask) { Cask::CaskLoader.load(cask_path("basic-cask")) } let(:dsl) { Cask::DSL::Caveats.new(cask) } it_behaves_like Cask::DSL::Base # TODO: add tests for Caveats DSL methods end
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/dsl/postflight_spec.rb
Library/Homebrew/test/cask/dsl/postflight_spec.rb
require "test/cask/dsl/shared_examples/base" require "test/cask/dsl/shared_examples/staged" describe Cask::DSL::Postflight, :cask do let(:cask) { Cask::CaskLoader.load(cask_path("basic-cask")) } let(:dsl) { Cask::DSL::Postflight.new(cask, FakeSystemCommand) } it_behaves_like Cask::DSL::Base it_behaves_like C...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/dsl/uninstall_postflight_spec.rb
Library/Homebrew/test/cask/dsl/uninstall_postflight_spec.rb
require "test/cask/dsl/shared_examples/base" describe Cask::DSL::UninstallPostflight, :cask do let(:cask) { Cask::CaskLoader.load(cask_path("basic-cask")) } let(:dsl) { Cask::DSL::UninstallPostflight.new(cask, FakeSystemCommand) } it_behaves_like Cask::DSL::Base end
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/dsl/appcast_spec.rb
Library/Homebrew/test/cask/dsl/appcast_spec.rb
require "cmd/cask" describe Cask::DSL::Appcast do subject { described_class.new(url, params) } let(:url) { "https://brew.sh" } let(:uri) { URI(url) } let(:params) { {} } describe "#to_s" do it "returns the parsed URI string" do expect(subject.to_s).to eq("https://brew.sh") end end descri...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/dsl/preflight_spec.rb
Library/Homebrew/test/cask/dsl/preflight_spec.rb
require "test/cask/dsl/shared_examples/base" require "test/cask/dsl/shared_examples/staged" describe Cask::DSL::Preflight, :cask do let(:cask) { Cask::CaskLoader.load(cask_path("basic-cask")) } let(:dsl) { Cask::DSL::Preflight.new(cask, FakeSystemCommand) } it_behaves_like Cask::DSL::Base it_behaves_like Cas...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/dsl/shared_examples/staged.rb
Library/Homebrew/test/cask/dsl/shared_examples/staged.rb
require "cask/staged" shared_examples Cask::Staged do let(:existing_path) { Pathname.new("/path/to/file/that/exists") } let(:non_existent_path) { Pathname.new("/path/to/file/that/does/not/exist") } before do allow(existing_path).to receive(:exist?).and_return(true) allow(existing_path).to receive(:expan...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/dsl/shared_examples/base.rb
Library/Homebrew/test/cask/dsl/shared_examples/base.rb
require "cask/dsl/base" shared_examples Cask::DSL::Base do it "supports the token method" do expect(dsl.token).to eq(cask.token) end it "supports the version method" do expect(dsl.version).to eq(cask.version) end it "supports the caskroom_path method" do expect(dsl.caskroom_path).to eq(cask.cas...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/artifact/zap_spec.rb
Library/Homebrew/test/cask/artifact/zap_spec.rb
require_relative "shared_examples/uninstall_zap" describe Cask::Artifact::Zap, :cask do describe "#zap_phase" do include_examples "#uninstall_phase or #zap_phase" end end
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/artifact/two_apps_correct_spec.rb
Library/Homebrew/test/cask/artifact/two_apps_correct_spec.rb
describe Cask::Artifact::App, :cask do describe "multiple apps" do let(:cask) { Cask::CaskLoader.load(cask_path("with-two-apps-correct")) } let(:install_phase) { lambda do cask.artifacts.select { |a| a.is_a?(described_class) }.each do |artifact| artifact.install_phase(command: NeverSu...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/artifact/uninstall_no_zap_spec.rb
Library/Homebrew/test/cask/artifact/uninstall_no_zap_spec.rb
describe Cask::Artifact::Zap, :cask do let(:cask) { Cask::CaskLoader.load(cask_path("with-installable")) } let(:zap_artifact) { cask.artifacts.find { |a| a.is_a?(described_class) } } before do InstallHelper.install_without_artifacts(cask) end describe "#uninstall_phase" do subject { zap_artif...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/artifact/generic_artifact_spec.rb
Library/Homebrew/test/cask/artifact/generic_artifact_spec.rb
describe Cask::Artifact::Artifact, :cask do let(:cask) { Cask::CaskLoader.load(cask_path("with-generic-artifact")) } let(:install_phase) { lambda do cask.artifacts.select { |a| a.is_a?(described_class) }.each do |artifact| artifact.install_phase(command: NeverSudoSystemCommand, force: false) ...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/artifact/preflight_block_spec.rb
Library/Homebrew/test/cask/artifact/preflight_block_spec.rb
describe Cask::Artifact::PreflightBlock, :cask do describe "install_phase" do it "calls the specified block before installing, passing a Cask mini-dsl" do called = false yielded_arg = nil cask = Cask::Cask.new("with-preflight") do preflight do |c| called = true yield...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/artifact/postflight_block_spec.rb
Library/Homebrew/test/cask/artifact/postflight_block_spec.rb
describe Cask::Artifact::PostflightBlock, :cask do describe "install_phase" do it "calls the specified block after installing, passing a Cask mini-dsl" do called = false yielded_arg = nil cask = Cask::Cask.new("with-postflight") do postflight do |c| called = true yie...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/artifact/binary_spec.rb
Library/Homebrew/test/cask/artifact/binary_spec.rb
describe Cask::Artifact::Binary, :cask do let(:cask) { Cask::CaskLoader.load(cask_path("with-binary")).tap do |cask| InstallHelper.install_without_artifacts(cask) end } let(:artifacts) { cask.artifacts.select { |a| a.is_a?(described_class) } } let(:expected_path) { Cask::Config.global.binarydir.jo...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/artifact/pkg_spec.rb
Library/Homebrew/test/cask/artifact/pkg_spec.rb
describe Cask::Artifact::Pkg, :cask do let(:cask) { Cask::CaskLoader.load(cask_path("with-installable")) } let(:fake_system_command) { class_double(SystemCommand) } before do InstallHelper.install_without_artifacts(cask) end describe "install_phase" do it "runs the system installer on the specified ...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/artifact/suite_spec.rb
Library/Homebrew/test/cask/artifact/suite_spec.rb
describe Cask::Artifact::Suite, :cask do let(:cask) { Cask::CaskLoader.load(cask_path("with-suite")) } let(:install_phase) { lambda do cask.artifacts.select { |a| a.is_a?(described_class) }.each do |artifact| artifact.install_phase(command: NeverSudoSystemCommand, force: false) end end ...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/artifact/app_spec.rb
Library/Homebrew/test/cask/artifact/app_spec.rb
describe Cask::Artifact::App, :cask do let(:cask) { Cask::CaskLoader.load(cask_path("local-caffeine")) } let(:command) { SystemCommand } let(:force) { false } let(:app) { cask.artifacts.find { |a| a.is_a?(described_class) } } let(:source_path) { cask.staged_path.join("Caffeine.app") } let(:target_path) { C...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/artifact/alt_target_spec.rb
Library/Homebrew/test/cask/artifact/alt_target_spec.rb
describe Cask::Artifact::App, :cask do describe "activate to alternate target" do let(:cask) { Cask::CaskLoader.load(cask_path("with-alt-target")) } let(:install_phase) { lambda do cask.artifacts.select { |a| a.is_a?(described_class) }.each do |artifact| artifact.install_phase(command...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/artifact/uninstall_spec.rb
Library/Homebrew/test/cask/artifact/uninstall_spec.rb
require_relative "shared_examples/uninstall_zap" describe Cask::Artifact::Uninstall, :cask do describe "#uninstall_phase" do include_examples "#uninstall_phase or #zap_phase" end end
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/artifact/installer_spec.rb
Library/Homebrew/test/cask/artifact/installer_spec.rb
describe Cask::Artifact::Installer, :cask do subject(:installer) { described_class.new(cask, **args) } let(:staged_path) { mktmpdir } let(:cask) { instance_double(Cask::Cask, staged_path: staged_path, config: nil) } let(:command) { SystemCommand } let(:args) { {} } describe "#install_phase" do conte...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/artifact/shared_examples/uninstall_zap.rb
Library/Homebrew/test/cask/artifact/shared_examples/uninstall_zap.rb
require "benchmark" shared_examples "#uninstall_phase or #zap_phase" do subject { artifact } let(:artifact_dsl_key) { described_class.dsl_key } let(:artifact) { cask.artifacts.find { |a| a.is_a?(described_class) } } let(:fake_system_command) { FakeSystemCommand } context "using :launchctl" do let(:cask...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/cask_loader/from_content_loader_spec.rb
Library/Homebrew/test/cask/cask_loader/from_content_loader_spec.rb
describe Cask::CaskLoader::FromContentLoader do alias_matcher :be_able_to_load, :be_can_load describe "::can_load?" do it "returns true for Casks specified with `cask \"token\" do … end`" do expect(described_class).to be_able_to_load <<~RUBY cask "token" do end RUBY end it ...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false
Linuxbrew/brew
https://github.com/Linuxbrew/brew/blob/93389fde63974f096156344e281610acec44130c/Library/Homebrew/test/cask/cask_loader/from__path_loader_spec.rb
Library/Homebrew/test/cask/cask_loader/from__path_loader_spec.rb
describe Cask::CaskLoader::FromPathLoader do describe "#load" do context "when the file does not contain a cask" do let(:path) { (mktmpdir/"cask.rb").tap do |path| path.write <<~RUBY true RUBY end } it "raises an error" do expect { ...
ruby
BSD-2-Clause
93389fde63974f096156344e281610acec44130c
2026-01-04T15:53:38.399858Z
false