git grep -l '^describe' | xargs gsed -i 's|^describe|RSpec.describe|g'

This commit is contained in:
Douglas Eichelberger 2024-02-18 15:11:11 -08:00 committed by Mike McQuaid
parent 2255b9d43d
commit 26eda5a303
No known key found for this signature in database
GPG Key ID: 3338A31AFDB1D829
419 changed files with 419 additions and 419 deletions

View File

@ -2,7 +2,7 @@
require "extend/ENV" require "extend/ENV"
describe "ENV" do RSpec.describe "ENV" do
shared_examples EnvActivation do shared_examples EnvActivation do
subject(:env) { env_activation.extend(described_class) } subject(:env) { env_activation.extend(described_class) }

View File

@ -2,7 +2,7 @@
require "PATH" require "PATH"
describe PATH do RSpec.describe PATH do
describe "#initialize" do describe "#initialize" do
it "can take multiple arguments" do it "can take multiple arguments" do
expect(described_class.new("/path1", "/path2")).to eq("/path1:/path2") expect(described_class.new("/path1", "/path2")).to eq("/path1:/path2")

View File

@ -2,7 +2,7 @@
require "api" require "api"
describe Homebrew::API::Cask do RSpec.describe Homebrew::API::Cask do
let(:cache_dir) { mktmpdir } let(:cache_dir) { mktmpdir }
before do before do

View File

@ -2,7 +2,7 @@
require "api" require "api"
describe Homebrew::API::Formula do RSpec.describe Homebrew::API::Formula do
let(:cache_dir) { mktmpdir } let(:cache_dir) { mktmpdir }
before do before do

View File

@ -2,7 +2,7 @@
require "api" require "api"
describe Homebrew::API do RSpec.describe Homebrew::API do
let(:text) { "foo" } let(:text) { "foo" }
let(:json) { '{"foo":"bar"}' } let(:json) { '{"foo":"bar"}' }
let(:json_hash) { JSON.parse(json) } let(:json_hash) { JSON.parse(json) }

View File

@ -2,7 +2,7 @@
require "open3" require "open3"
describe "Bash" do RSpec.describe "Bash" do
matcher :have_valid_bash_syntax do matcher :have_valid_bash_syntax do
match do |file| match do |file|
stdout, stderr, status = Open3.capture3("/bin/bash", "-n", file) stdout, stderr, status = Open3.capture3("/bin/bash", "-n", file)

View File

@ -3,7 +3,7 @@
require "formula" require "formula"
require "software_spec" require "software_spec"
describe Bottle::Filename do RSpec.describe Bottle::Filename do
subject { described_class.new(name, version, tag, rebuild) } subject { described_class.new(name, version, tag, rebuild) }
let(:name) { "user/repo/foo" } let(:name) { "user/repo/foo" }

View File

@ -2,7 +2,7 @@
require "build_environment" require "build_environment"
describe BuildEnvironment do RSpec.describe BuildEnvironment do
let(:env) { described_class.new } let(:env) { described_class.new }
describe "#<<" do describe "#<<" do

View File

@ -3,7 +3,7 @@
require "build_options" require "build_options"
require "options" require "options"
describe BuildOptions do RSpec.describe BuildOptions do
alias_matcher :be_built_with, :be_with alias_matcher :be_built_with, :be_with
alias_matcher :be_built_without, :be_without alias_matcher :be_built_without, :be_without

View File

@ -2,7 +2,7 @@
require "bump_version_parser" require "bump_version_parser"
describe Homebrew::BumpVersionParser do RSpec.describe Homebrew::BumpVersionParser do
let(:general_version) { "1.2.3" } let(:general_version) { "1.2.3" }
let(:intel_version) { "2.3.4" } let(:intel_version) { "2.3.4" }
let(:arm_version) { "3.4.5" } let(:arm_version) { "3.4.5" }

View File

@ -2,7 +2,7 @@
require "bundle_version" require "bundle_version"
describe Homebrew::BundleVersion do RSpec.describe Homebrew::BundleVersion do
describe "#<=>" do describe "#<=>" do
it "compares both the `short_version` and `version`" 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", "3000")).to be < described_class.new("1.2.3", "4000")

View File

@ -2,7 +2,7 @@
require "cache_store" require "cache_store"
describe CacheStoreDatabase do RSpec.describe CacheStoreDatabase do
subject(:sample_db) { described_class.new(:sample) } subject(:sample_db) { described_class.new(:sample) }
describe "self.use" do describe "self.use" do

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
describe Cask::Artifact::AbstractArtifact, :cask do RSpec.describe Cask::Artifact::AbstractArtifact, :cask do
describe ".read_script_arguments" do describe ".read_script_arguments" do
let(:stanza) { :installer } let(:stanza) { :installer }

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
describe Cask::Artifact::App, :cask do RSpec.describe Cask::Artifact::App, :cask do
describe "activate to alternate target" do describe "activate to alternate target" do
let(:cask) { Cask::CaskLoader.load(cask_path("with-alt-target")) } let(:cask) { Cask::CaskLoader.load(cask_path("with-alt-target")) }

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
describe Cask::Artifact::App, :cask do RSpec.describe Cask::Artifact::App, :cask do
let(:cask) { Cask::CaskLoader.load(cask_path("local-caffeine")) } let(:cask) { Cask::CaskLoader.load(cask_path("local-caffeine")) }
let(:command) { NeverSudoSystemCommand } let(:command) { NeverSudoSystemCommand }
let(:adopt) { false } let(:adopt) { false }

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
describe Cask::Artifact::Binary, :cask do RSpec.describe Cask::Artifact::Binary, :cask do
let(:cask) do let(:cask) do
Cask::CaskLoader.load(cask_path("with-binary")).tap do |cask| Cask::CaskLoader.load(cask_path("with-binary")).tap do |cask|
InstallHelper.install_without_artifacts(cask) InstallHelper.install_without_artifacts(cask)

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
describe Cask::Artifact::Artifact, :cask do RSpec.describe Cask::Artifact::Artifact, :cask do
let(:cask) { Cask::CaskLoader.load(cask_path("with-generic-artifact")) } let(:cask) { Cask::CaskLoader.load(cask_path("with-generic-artifact")) }
let(:install_phase) do let(:install_phase) do

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
describe Cask::Artifact::Installer, :cask do RSpec.describe Cask::Artifact::Installer, :cask do
subject(:installer) { described_class.new(cask, **args) } subject(:installer) { described_class.new(cask, **args) }
let(:staged_path) { mktmpdir } let(:staged_path) { mktmpdir }

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
describe Cask::Artifact::Manpage, :cask do RSpec.describe Cask::Artifact::Manpage, :cask do
let(:cask) { Cask::CaskLoader.load(cask_token) } let(:cask) { Cask::CaskLoader.load(cask_token) }
context "without section" do context "without section" do

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
describe Cask::Artifact::Pkg, :cask do RSpec.describe Cask::Artifact::Pkg, :cask do
let(:cask) { Cask::CaskLoader.load(cask_path("with-installable")) } let(:cask) { Cask::CaskLoader.load(cask_path("with-installable")) }
let(:fake_system_command) { class_double(SystemCommand) } let(:fake_system_command) { class_double(SystemCommand) }

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
describe Cask::Artifact::PostflightBlock, :cask do RSpec.describe Cask::Artifact::PostflightBlock, :cask do
describe "install_phase" do describe "install_phase" do
it "calls the specified block after installing, passing a Cask mini-dsl" do it "calls the specified block after installing, passing a Cask mini-dsl" do
called = false called = false

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
describe Cask::Artifact::PreflightBlock, :cask do RSpec.describe Cask::Artifact::PreflightBlock, :cask do
describe "install_phase" do describe "install_phase" do
it "calls the specified block before installing, passing a Cask mini-dsl" do it "calls the specified block before installing, passing a Cask mini-dsl" do
called = false called = false

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
describe Cask::Artifact::Suite, :cask do RSpec.describe Cask::Artifact::Suite, :cask do
let(:cask) { Cask::CaskLoader.load(cask_path("with-suite")) } let(:cask) { Cask::CaskLoader.load(cask_path("with-suite")) }
let(:install_phase) do let(:install_phase) do

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
describe Cask::Artifact::App, :cask do RSpec.describe Cask::Artifact::App, :cask do
describe "multiple apps" do describe "multiple apps" do
let(:cask) { Cask::CaskLoader.load(cask_path("with-two-apps-correct")) } let(:cask) { Cask::CaskLoader.load(cask_path("with-two-apps-correct")) }

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
describe Cask::Artifact::Zap, :cask do RSpec.describe Cask::Artifact::Zap, :cask do
let(:cask) { Cask::CaskLoader.load(cask_path("with-installable")) } let(:cask) { Cask::CaskLoader.load(cask_path("with-installable")) }
let(:zap_artifact) do let(:zap_artifact) do

View File

@ -2,7 +2,7 @@
require_relative "shared_examples/uninstall_zap" require_relative "shared_examples/uninstall_zap"
describe Cask::Artifact::Uninstall, :cask do RSpec.describe Cask::Artifact::Uninstall, :cask do
describe "#uninstall_phase" do describe "#uninstall_phase" do
include_examples "#uninstall_phase or #zap_phase" include_examples "#uninstall_phase or #zap_phase"
end end

View File

@ -2,7 +2,7 @@
require_relative "shared_examples/uninstall_zap" require_relative "shared_examples/uninstall_zap"
describe Cask::Artifact::Zap, :cask do RSpec.describe Cask::Artifact::Zap, :cask do
describe "#zap_phase" do describe "#zap_phase" do
include_examples "#uninstall_phase or #zap_phase" include_examples "#uninstall_phase or #zap_phase"

View File

@ -2,7 +2,7 @@
require "cask/audit" require "cask/audit"
describe Cask::Audit, :cask do RSpec.describe Cask::Audit, :cask do
def include_msg?(problems, msg) def include_msg?(problems, msg)
if msg.is_a?(Regexp) if msg.is_a?(Regexp)
Array(problems).any? { |problem| msg.match?(problem[:message]) } Array(problems).any? { |problem| msg.match?(problem[:message]) }

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
describe Cask::CaskLoader::FromAPILoader, :cask do RSpec.describe Cask::CaskLoader::FromAPILoader, :cask do
shared_context "with API setup" do |new_token| shared_context "with API setup" do |new_token|
let(:token) { new_token } let(:token) { new_token }
let(:cask_from_source) { Cask::CaskLoader.load(token) } let(:cask_from_source) { Cask::CaskLoader.load(token) }

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
describe Cask::CaskLoader::FromContentLoader do RSpec.describe Cask::CaskLoader::FromContentLoader do
describe "::try_new" do describe "::try_new" do
it "returns a loader for Casks specified with `cask \"token\" do … end`" do it "returns a loader for Casks specified with `cask \"token\" do … end`" do
expect(described_class.try_new(<<~RUBY)).not_to be_nil expect(described_class.try_new(<<~RUBY)).not_to be_nil

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
describe Cask::CaskLoader::FromPathLoader do RSpec.describe Cask::CaskLoader::FromPathLoader do
describe "#load" do describe "#load" do
context "when the file does not contain a cask" do context "when the file does not contain a cask" do
let(:path) do let(:path) do

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
describe Cask::CaskLoader::FromTapLoader do RSpec.describe Cask::CaskLoader::FromTapLoader do
let(:cask_name) { "testball" } let(:cask_name) { "testball" }
let(:cask_full_name) { "homebrew/cask/#{cask_name}" } let(:cask_full_name) { "homebrew/cask/#{cask_name}" }
let(:cask_path) { CoreCaskTap.instance.cask_dir/"#{cask_name}.rb" } let(:cask_path) { CoreCaskTap.instance.cask_dir/"#{cask_name}.rb" }

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
describe Cask::CaskLoader::FromURILoader do RSpec.describe Cask::CaskLoader::FromURILoader do
describe "::try_new" do describe "::try_new" do
it "returns a loader when given an URI" do it "returns a loader when given an URI" do
expect(described_class.try_new(URI("https://brew.sh/"))).not_to be_nil expect(described_class.try_new(URI("https://brew.sh/"))).not_to be_nil

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
describe Cask::CaskLoader, :cask do RSpec.describe Cask::CaskLoader, :cask do
describe "::for" do describe "::for" do
let(:tap) { CoreCaskTap.instance } let(:tap) { CoreCaskTap.instance }

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
describe Cask::Cask, :cask do RSpec.describe Cask::Cask, :cask do
let(:cask) { described_class.new("versioned-cask") } let(:cask) { described_class.new("versioned-cask") }
context "when multiple versions are installed" do context "when multiple versions are installed" do

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
describe Cask::Config, :cask do RSpec.describe Cask::Config, :cask do
subject(:config) { described_class.new } subject(:config) { described_class.new }
describe "::from_json" do describe "::from_json" do

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
describe "conflicts_with", :cask do RSpec.describe "conflicts_with", :cask do
describe "conflicts_with cask" do describe "conflicts_with cask" do
let(:local_caffeine) do let(:local_caffeine) do
Cask::CaskLoader.load(cask_path("local-caffeine")) Cask::CaskLoader.load(cask_path("local-caffeine"))

View File

@ -2,7 +2,7 @@
require "cask/denylist" require "cask/denylist"
describe Cask::Denylist, :cask do RSpec.describe Cask::Denylist, :cask do
describe "::reason" do describe "::reason" do
matcher :disallow do |name| matcher :disallow do |name|
match do |expected| match do |expected|

View File

@ -2,7 +2,7 @@
# TODO: this test should be named after the corresponding class, once # TODO: this test should be named after the corresponding class, once
# that class is abstracted from installer.rb # that class is abstracted from installer.rb
describe "Satisfy Dependencies and Requirements", :cask do RSpec.describe "Satisfy Dependencies and Requirements", :cask do
subject(:install) do subject(:install) do
Cask::Installer.new(cask).install Cask::Installer.new(cask).install
end end

View File

@ -2,7 +2,7 @@
require "test/cask/dsl/shared_examples/base" require "test/cask/dsl/shared_examples/base"
describe Cask::DSL::Caveats, :cask do RSpec.describe Cask::DSL::Caveats, :cask do
subject(:caveats) { described_class.new(cask) } subject(:caveats) { described_class.new(cask) }
let(:cask) { Cask::CaskLoader.load(cask_path("basic-cask")) } let(:cask) { Cask::CaskLoader.load(cask_path("basic-cask")) }

View File

@ -2,7 +2,7 @@
require "test/cask/dsl/shared_examples/base" require "test/cask/dsl/shared_examples/base"
describe Cask::DSL::Container do RSpec.describe Cask::DSL::Container do
subject(:container) { described_class.new(**params) } subject(:container) { described_class.new(**params) }
describe "#pairs" do describe "#pairs" do

View File

@ -3,7 +3,7 @@
require "test/cask/dsl/shared_examples/base" require "test/cask/dsl/shared_examples/base"
require "test/cask/dsl/shared_examples/staged" require "test/cask/dsl/shared_examples/staged"
describe Cask::DSL::Postflight, :cask do RSpec.describe Cask::DSL::Postflight, :cask do
let(:cask) { Cask::CaskLoader.load(cask_path("basic-cask")) } let(:cask) { Cask::CaskLoader.load(cask_path("basic-cask")) }
let(:fake_system_command) { class_double(SystemCommand) } let(:fake_system_command) { class_double(SystemCommand) }
let(:dsl) { described_class.new(cask, fake_system_command) } let(:dsl) { described_class.new(cask, fake_system_command) }

View File

@ -3,7 +3,7 @@
require "test/cask/dsl/shared_examples/base" require "test/cask/dsl/shared_examples/base"
require "test/cask/dsl/shared_examples/staged" require "test/cask/dsl/shared_examples/staged"
describe Cask::DSL::Preflight, :cask do RSpec.describe Cask::DSL::Preflight, :cask do
let(:cask) { Cask::CaskLoader.load(cask_path("basic-cask")) } let(:cask) { Cask::CaskLoader.load(cask_path("basic-cask")) }
let(:fake_system_command) { class_double(SystemCommand) } let(:fake_system_command) { class_double(SystemCommand) }
let(:dsl) { described_class.new(cask, fake_system_command) } let(:dsl) { described_class.new(cask, fake_system_command) }

View File

@ -2,7 +2,7 @@
require "test/cask/dsl/shared_examples/base" require "test/cask/dsl/shared_examples/base"
describe Cask::DSL::UninstallPostflight, :cask do RSpec.describe Cask::DSL::UninstallPostflight, :cask do
let(:cask) { Cask::CaskLoader.load(cask_path("basic-cask")) } let(:cask) { Cask::CaskLoader.load(cask_path("basic-cask")) }
let(:dsl) { described_class.new(cask, class_double(SystemCommand)) } let(:dsl) { described_class.new(cask, class_double(SystemCommand)) }

View File

@ -3,7 +3,7 @@
require "test/cask/dsl/shared_examples/base" require "test/cask/dsl/shared_examples/base"
require "test/cask/dsl/shared_examples/staged" require "test/cask/dsl/shared_examples/staged"
describe Cask::DSL::UninstallPreflight, :cask do RSpec.describe Cask::DSL::UninstallPreflight, :cask do
let(:cask) { Cask::CaskLoader.load(cask_path("basic-cask")) } let(:cask) { Cask::CaskLoader.load(cask_path("basic-cask")) }
let(:fake_system_command) { class_double(SystemCommand) } let(:fake_system_command) { class_double(SystemCommand) }
let(:dsl) { described_class.new(cask, fake_system_command) } let(:dsl) { described_class.new(cask, fake_system_command) }

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
describe Cask::DSL::Version, :cask do RSpec.describe Cask::DSL::Version, :cask do
shared_examples "expectations hash" do |input_name, expectations| shared_examples "expectations hash" do |input_name, expectations|
expectations.each do |input_value, expected_output| expectations.each do |input_value, expected_output|
context "when #{input_name} is #{input_value.inspect}" do context "when #{input_name} is #{input_value.inspect}" do

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
describe Cask::DSL, :cask do RSpec.describe Cask::DSL, :cask do
let(:cask) { Cask::CaskLoader.load(token) } let(:cask) { Cask::CaskLoader.load(token) }
let(:token) { "basic-cask" } let(:token) { "basic-cask" }

View File

@ -2,7 +2,7 @@
require "utils" require "utils"
describe Cask::Info, :cask do RSpec.describe Cask::Info, :cask do
it "displays some nice info about the specified Cask" do it "displays some nice info about the specified Cask" do
expect do expect do
described_class.info(Cask::CaskLoader.load("local-transmission")) described_class.info(Cask::CaskLoader.load("local-transmission"))

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
describe Cask::Installer, :cask do RSpec.describe Cask::Installer, :cask do
describe "install" do describe "install" do
it "downloads and installs a nice fresh Cask" do it "downloads and installs a nice fresh Cask" do
caffeine = Cask::CaskLoader.load(cask_path("local-caffeine")) caffeine = Cask::CaskLoader.load(cask_path("local-caffeine"))

View File

@ -2,7 +2,7 @@
require "cask/list" require "cask/list"
describe Cask::List, :cask do RSpec.describe Cask::List, :cask do
it "lists the installed Casks in a pretty fashion" do it "lists the installed Casks in a pretty fashion" do
casks = %w[local-caffeine local-transmission].map { |c| Cask::CaskLoader.load(c) } casks = %w[local-caffeine local-transmission].map { |c| Cask::CaskLoader.load(c) }

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
describe MacOS, :cask do RSpec.describe MacOS, :cask do
it "says '/' is undeletable" do it "says '/' is undeletable" do
expect(described_class).to be_undeletable( expect(described_class).to be_undeletable(
"/", "/",

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
describe Cask::Pkg, :cask do RSpec.describe Cask::Pkg, :cask do
describe "#uninstall" do describe "#uninstall" do
let(:fake_system_command) { NeverSudoSystemCommand } let(:fake_system_command) { NeverSudoSystemCommand }
let(:empty_response) do let(:empty_response) do

View File

@ -3,7 +3,7 @@
require "cask/installer" require "cask/installer"
require "cask/reinstall" require "cask/reinstall"
describe Cask::Reinstall, :cask do RSpec.describe Cask::Reinstall, :cask do
it "displays the reinstallation progress" do it "displays the reinstallation progress" do
caffeine = Cask::CaskLoader.load(cask_path("local-caffeine")) caffeine = Cask::CaskLoader.load(cask_path("local-caffeine"))

View File

@ -2,7 +2,7 @@
require "cask/uninstall" require "cask/uninstall"
describe Cask::Uninstall, :cask do RSpec.describe Cask::Uninstall, :cask do
it "displays the uninstallation progress" do it "displays the uninstallation progress" do
caffeine = Cask::CaskLoader.load(cask_path("local-caffeine")) caffeine = Cask::CaskLoader.load(cask_path("local-caffeine"))

View File

@ -2,7 +2,7 @@
require "cask/upgrade" require "cask/upgrade"
describe Cask::Upgrade, :cask do RSpec.describe Cask::Upgrade, :cask do
let(:version_latest_paths) do let(:version_latest_paths) do
[ [
version_latest.config.appdir.join("Caffeine Mini.app"), version_latest.config.appdir.join("Caffeine Mini.app"),

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
describe Cask::Utils do RSpec.describe Cask::Utils do
let(:command) { NeverSudoSystemCommand } let(:command) { NeverSudoSystemCommand }
let(:dir) { mktmpdir } let(:dir) { mktmpdir }
let(:path) { dir/"a/b/c" } let(:path) { dir/"a/b/c" }

View File

@ -3,7 +3,7 @@
require "cask/cask_loader" require "cask/cask_loader"
require "cask_dependent" require "cask_dependent"
describe CaskDependent, :needs_macos do RSpec.describe CaskDependent, :needs_macos do
subject(:dependent) { described_class.new test_cask } subject(:dependent) { described_class.new test_cask }
let :test_cask do let :test_cask do

View File

@ -3,7 +3,7 @@
require "formula" require "formula"
require "caveats" require "caveats"
describe Caveats do RSpec.describe Caveats do
subject(:caveats) { described_class.new(f) } subject(:caveats) { described_class.new(f) }
let(:f) { formula { url "foo-1.0" } } let(:f) { formula { url "foo-1.0" } }

View File

@ -2,7 +2,7 @@
require "checksum" require "checksum"
describe Checksum do RSpec.describe Checksum do
describe "#empty?" do describe "#empty?" do
subject { described_class.new("") } subject { described_class.new("") }

View File

@ -2,7 +2,7 @@
require "formula" require "formula"
describe Formula do RSpec.describe Formula do
def formula(&block) def formula(&block)
super do super do
url "file://#{TEST_FIXTURE_DIR}/tarballs/testball-0.1.tbz" url "file://#{TEST_FIXTURE_DIR}/tarballs/testball-0.1.tbz"

View File

@ -3,7 +3,7 @@
require "cleaner" require "cleaner"
require "formula" require "formula"
describe Cleaner do RSpec.describe Cleaner do
include FileUtils include FileUtils
describe "#clean" do describe "#clean" do

View File

@ -5,7 +5,7 @@ require "cleanup"
require "cask/cache" require "cask/cache"
require "fileutils" require "fileutils"
describe Homebrew::Cleanup do RSpec.describe Homebrew::Cleanup do
subject(:cleanup) { described_class.new } subject(:cleanup) { described_class.new }
let(:ds_store) { Pathname.new("#{HOMEBREW_CELLAR}/.DS_Store") } let(:ds_store) { Pathname.new("#{HOMEBREW_CELLAR}/.DS_Store") }

View File

@ -2,7 +2,7 @@
require "cli/named_args" require "cli/named_args"
describe Homebrew::CLI::NamedArgs do RSpec.describe Homebrew::CLI::NamedArgs do
def setup_unredable_formula(name) def setup_unredable_formula(name)
error = FormulaUnreadableError.new(name, RuntimeError.new("testing")) error = FormulaUnreadableError.new(name, RuntimeError.new("testing"))
allow(Formulary).to receive(:factory).with(name, any_args).and_raise(error) allow(Formulary).to receive(:factory).with(name, any_args).and_raise(error)

View File

@ -2,7 +2,7 @@
require_relative "../../cli/parser" require_relative "../../cli/parser"
describe Homebrew::CLI::Parser do RSpec.describe Homebrew::CLI::Parser do
describe "test switch options" do describe "test switch options" do
subject(:parser) do subject(:parser) do
described_class.new do described_class.new do

View File

@ -2,7 +2,7 @@
require "cmd/shared_examples/args_parse" require "cmd/shared_examples/args_parse"
describe "brew --cache" do RSpec.describe "brew --cache" do
it_behaves_like "parseable arguments" it_behaves_like "parseable arguments"
it "prints all cache files for a given Formula", :integration_test do it "prints all cache files for a given Formula", :integration_test do

View File

@ -2,7 +2,7 @@
require "cmd/shared_examples/args_parse" require "cmd/shared_examples/args_parse"
describe "brew --caskroom" do RSpec.describe "brew --caskroom" do
it_behaves_like "parseable arguments" it_behaves_like "parseable arguments"
it "prints Homebrew's Caskroom", :integration_test do it "prints Homebrew's Caskroom", :integration_test do

View File

@ -2,7 +2,7 @@
require "cmd/shared_examples/args_parse" require "cmd/shared_examples/args_parse"
describe "brew --cellar" do RSpec.describe "brew --cellar" do
it_behaves_like "parseable arguments" it_behaves_like "parseable arguments"
it "prints Homebrew's Cellar", :integration_test do it "prints Homebrew's Cellar", :integration_test do

View File

@ -2,7 +2,7 @@
require "cmd/shared_examples/args_parse" require "cmd/shared_examples/args_parse"
describe "brew --env" do RSpec.describe "brew --env" do
it_behaves_like "parseable arguments" it_behaves_like "parseable arguments"
describe "--shell=bash", :integration_test do describe "--shell=bash", :integration_test do

View File

@ -2,7 +2,7 @@
require "cmd/shared_examples/args_parse" require "cmd/shared_examples/args_parse"
describe "brew --prefix" do RSpec.describe "brew --prefix" do
it_behaves_like "parseable arguments" it_behaves_like "parseable arguments"
it "prints Homebrew's prefix", :integration_test do it "prints Homebrew's prefix", :integration_test do

View File

@ -2,7 +2,7 @@
require "cmd/shared_examples/args_parse" require "cmd/shared_examples/args_parse"
describe "brew --repository" do RSpec.describe "brew --repository" do
it_behaves_like "parseable arguments" it_behaves_like "parseable arguments"
it "prints Homebrew's repository", :integration_test do it "prints Homebrew's repository", :integration_test do

View File

@ -2,7 +2,7 @@
require "cmd/shared_examples/args_parse" require "cmd/shared_examples/args_parse"
describe "brew --version" do RSpec.describe "brew --version" do
it "prints the Homebrew's version", :integration_test do it "prints the Homebrew's version", :integration_test do
expect { brew_sh "--version" } expect { brew_sh "--version" }
.to output(/^Homebrew #{Regexp.escape(HOMEBREW_VERSION)}\n/o).to_stdout .to output(/^Homebrew #{Regexp.escape(HOMEBREW_VERSION)}\n/o).to_stdout

View File

@ -2,7 +2,7 @@
require "cmd/shared_examples/args_parse" require "cmd/shared_examples/args_parse"
describe "brew analytics" do RSpec.describe "brew analytics" do
it_behaves_like "parseable arguments" it_behaves_like "parseable arguments"
it "when HOMEBREW_NO_ANALYTICS is unset is disabled after running `brew analytics off`", :integration_test do it "when HOMEBREW_NO_ANALYTICS is unset is disabled after running `brew analytics off`", :integration_test do

View File

@ -2,7 +2,7 @@
require "cmd/shared_examples/args_parse" require "cmd/shared_examples/args_parse"
describe "brew autoremove" do RSpec.describe "brew autoremove" do
it_behaves_like "parseable arguments" it_behaves_like "parseable arguments"
describe "integration test" do describe "integration test" do

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
describe "brew bundle", :integration_test do RSpec.describe "brew bundle", :integration_test do
describe "check" do describe "check" do
it "checks if a Brewfile's dependencies are satisfied", :needs_network do it "checks if a Brewfile's dependencies are satisfied", :needs_network do
setup_remote_tap "homebrew/bundle" setup_remote_tap "homebrew/bundle"

View File

@ -2,7 +2,7 @@
require "cmd/shared_examples/args_parse" require "cmd/shared_examples/args_parse"
describe "brew cleanup" do RSpec.describe "brew cleanup" do
before do before do
FileUtils.mkdir_p HOMEBREW_LIBRARY/"Homebrew/vendor/" FileUtils.mkdir_p HOMEBREW_LIBRARY/"Homebrew/vendor/"
FileUtils.touch HOMEBREW_LIBRARY/"Homebrew/vendor/portable-ruby-version" FileUtils.touch HOMEBREW_LIBRARY/"Homebrew/vendor/portable-ruby-version"

View File

@ -5,7 +5,7 @@ require "fileutils"
require "cmd/shared_examples/args_parse" require "cmd/shared_examples/args_parse"
describe "brew commands" do RSpec.describe "brew commands" do
it_behaves_like "parseable arguments" it_behaves_like "parseable arguments"
it "prints a list of all available commands", :integration_test do it "prints a list of all available commands", :integration_test do

View File

@ -2,7 +2,7 @@
require "cmd/shared_examples/args_parse" require "cmd/shared_examples/args_parse"
describe "brew completions" do RSpec.describe "brew completions" do
it_behaves_like "parseable arguments" it_behaves_like "parseable arguments"
it "runs the status subcommand correctly", :integration_test do it "runs the status subcommand correctly", :integration_test do

View File

@ -2,7 +2,7 @@
require "cmd/shared_examples/args_parse" require "cmd/shared_examples/args_parse"
describe "brew config" do RSpec.describe "brew config" do
it_behaves_like "parseable arguments" it_behaves_like "parseable arguments"
it "prints information about the current Homebrew configuration", :integration_test do it "prints information about the current Homebrew configuration", :integration_test do

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
describe "brew custom-external-command", :integration_test do RSpec.describe "brew custom-external-command", :integration_test do
it "is supported" do it "is supported" do
mktmpdir do |path| mktmpdir do |path|
cmd = "custom-external-command-#{rand}" cmd = "custom-external-command-#{rand}"

View File

@ -2,7 +2,7 @@
require "cmd/shared_examples/args_parse" require "cmd/shared_examples/args_parse"
describe "brew deps" do RSpec.describe "brew deps" do
it_behaves_like "parseable arguments" it_behaves_like "parseable arguments"
it "outputs all of a Formula's dependencies and their dependencies on separate lines", :integration_test do it "outputs all of a Formula's dependencies and their dependencies on separate lines", :integration_test do

View File

@ -2,7 +2,7 @@
require "cmd/shared_examples/args_parse" require "cmd/shared_examples/args_parse"
describe "brew desc" do RSpec.describe "brew desc" do
it_behaves_like "parseable arguments" it_behaves_like "parseable arguments"
it "shows a given Formula's description", :integration_test do it "shows a given Formula's description", :integration_test do

View File

@ -2,6 +2,6 @@
require "cmd/shared_examples/args_parse" require "cmd/shared_examples/args_parse"
describe "brew developer" do RSpec.describe "brew developer" do
it_behaves_like "parseable arguments" it_behaves_like "parseable arguments"
end end

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
describe "brew docs" do RSpec.describe "brew docs" do
it "opens the docs page", :integration_test do it "opens the docs page", :integration_test do
expect { brew "docs", "HOMEBREW_BROWSER" => "echo" } expect { brew "docs", "HOMEBREW_BROWSER" => "echo" }
.to output("https://docs.brew.sh\n").to_stdout .to output("https://docs.brew.sh\n").to_stdout

View File

@ -2,7 +2,7 @@
require "cmd/shared_examples/args_parse" require "cmd/shared_examples/args_parse"
describe "brew doctor" do RSpec.describe "brew doctor" do
it_behaves_like "parseable arguments" it_behaves_like "parseable arguments"
specify "check_integration_test", :integration_test do specify "check_integration_test", :integration_test do

View File

@ -2,7 +2,7 @@
require "cmd/shared_examples/args_parse" require "cmd/shared_examples/args_parse"
describe "brew fetch" do RSpec.describe "brew fetch" do
it_behaves_like "parseable arguments" it_behaves_like "parseable arguments"
it "downloads the Formula's URL", :integration_test do it "downloads the Formula's URL", :integration_test do

View File

@ -2,6 +2,6 @@
require "cmd/shared_examples/args_parse" require "cmd/shared_examples/args_parse"
describe "brew gist-logs" do RSpec.describe "brew gist-logs" do
it_behaves_like "parseable arguments" it_behaves_like "parseable arguments"
end end

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
describe "brew", :integration_test do RSpec.describe "brew", :integration_test do
describe "help" do describe "help" do
it "prints help for a documented Ruby command" do it "prints help for a documented Ruby command" do
expect { brew "help", "cat" } expect { brew "help", "cat" }

View File

@ -2,7 +2,7 @@
require "cmd/shared_examples/args_parse" require "cmd/shared_examples/args_parse"
describe "brew home" do RSpec.describe "brew home" do
let(:testballhome_homepage) do let(:testballhome_homepage) do
Formula["testballhome"].homepage Formula["testballhome"].homepage
end end

View File

@ -4,7 +4,7 @@ require "cmd/info"
require "cmd/shared_examples/args_parse" require "cmd/shared_examples/args_parse"
describe "brew info" do RSpec.describe "brew info" do
it_behaves_like "parseable arguments" it_behaves_like "parseable arguments"
it "prints as json with the --json=v1 flag", :integration_test do it "prints as json with the --json=v1 flag", :integration_test do

View File

@ -2,7 +2,7 @@
require "cmd/shared_examples/args_parse" require "cmd/shared_examples/args_parse"
describe "brew install" do RSpec.describe "brew install" do
it_behaves_like "parseable arguments" it_behaves_like "parseable arguments"
it "installs formulae", :integration_test do it "installs formulae", :integration_test do

View File

@ -2,7 +2,7 @@
require "cmd/shared_examples/args_parse" require "cmd/shared_examples/args_parse"
describe "brew leaves" do RSpec.describe "brew leaves" do
it_behaves_like "parseable arguments" it_behaves_like "parseable arguments"
context "when there are no installed Formulae", :integration_test do context "when there are no installed Formulae", :integration_test do

View File

@ -2,7 +2,7 @@
require "cmd/shared_examples/args_parse" require "cmd/shared_examples/args_parse"
describe "brew link" do RSpec.describe "brew link" do
it_behaves_like "parseable arguments" it_behaves_like "parseable arguments"
it "links a given Formula", :integration_test do it "links a given Formula", :integration_test do

View File

@ -2,7 +2,7 @@
require "cmd/shared_examples/args_parse" require "cmd/shared_examples/args_parse"
describe "brew list" do RSpec.describe "brew list" do
let(:formulae) { %w[bar foo qux] } let(:formulae) { %w[bar foo qux] }
it_behaves_like "parseable arguments" it_behaves_like "parseable arguments"

View File

@ -2,7 +2,7 @@
require "cmd/shared_examples/args_parse" require "cmd/shared_examples/args_parse"
describe "brew log" do RSpec.describe "brew log" do
it_behaves_like "parseable arguments" it_behaves_like "parseable arguments"
it "shows the Git log for a given Formula", :integration_test do it "shows the Git log for a given Formula", :integration_test do

View File

@ -2,7 +2,7 @@
require "cmd/shared_examples/args_parse" require "cmd/shared_examples/args_parse"
describe "brew migrate" do RSpec.describe "brew migrate" do
it_behaves_like "parseable arguments" it_behaves_like "parseable arguments"
it "migrates a renamed Formula", :integration_test do it "migrates a renamed Formula", :integration_test do

View File

@ -2,7 +2,7 @@
require "cmd/shared_examples/args_parse" require "cmd/shared_examples/args_parse"
describe "brew missing" do RSpec.describe "brew missing" do
it_behaves_like "parseable arguments" it_behaves_like "parseable arguments"
it "prints missing dependencies", :integration_test do it "prints missing dependencies", :integration_test do

View File

@ -2,7 +2,7 @@
require "cmd/shared_examples/args_parse" require "cmd/shared_examples/args_parse"
describe "brew options" do RSpec.describe "brew options" do
it_behaves_like "parseable arguments" it_behaves_like "parseable arguments"
it "prints a given Formula's options", :integration_test do it "prints a given Formula's options", :integration_test do

View File

@ -2,7 +2,7 @@
require "cmd/shared_examples/args_parse" require "cmd/shared_examples/args_parse"
describe "brew outdated" do RSpec.describe "brew outdated" do
it_behaves_like "parseable arguments" it_behaves_like "parseable arguments"
it "outputs JSON", :integration_test do it "outputs JSON", :integration_test do

View File

@ -2,7 +2,7 @@
require "cmd/shared_examples/args_parse" require "cmd/shared_examples/args_parse"
describe "brew pin" do RSpec.describe "brew pin" do
it_behaves_like "parseable arguments" it_behaves_like "parseable arguments"
it "pins a Formula's version", :integration_test do it "pins a Formula's version", :integration_test do

View File

@ -2,6 +2,6 @@
require "cmd/shared_examples/args_parse" require "cmd/shared_examples/args_parse"
describe "brew postinstall" do RSpec.describe "brew postinstall" do
it_behaves_like "parseable arguments" it_behaves_like "parseable arguments"
end end

Some files were not shown because too many files have changed in this diff Show More