Merge pull request #16699 from dduugg/modern-rspec
Modernize RSpec configuration
This commit is contained in:
		
						commit
						aa925598ee
					
				@ -2,17 +2,23 @@
 | 
			
		||||
# frozen_string_literal: true
 | 
			
		||||
 | 
			
		||||
module Homebrew
 | 
			
		||||
  sig { returns(T::Array[String]) }
 | 
			
		||||
  def self.tar_args
 | 
			
		||||
    if MacOS.version >= :catalina
 | 
			
		||||
      ["--no-mac-metadata", "--no-acls", "--no-xattrs"].freeze
 | 
			
		||||
    else
 | 
			
		||||
      [].freeze
 | 
			
		||||
  class << self
 | 
			
		||||
    undef tar_args
 | 
			
		||||
 | 
			
		||||
    sig { returns(T::Array[String]) }
 | 
			
		||||
    def tar_args
 | 
			
		||||
      if MacOS.version >= :catalina
 | 
			
		||||
        ["--no-mac-metadata", "--no-acls", "--no-xattrs"].freeze
 | 
			
		||||
      else
 | 
			
		||||
        [].freeze
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    undef gnu_tar
 | 
			
		||||
 | 
			
		||||
    sig { params(gnu_tar_formula: Formula).returns(String) }
 | 
			
		||||
    def gnu_tar(gnu_tar_formula)
 | 
			
		||||
      "#{gnu_tar_formula.opt_bin}/gtar"
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  sig { params(gnu_tar_formula: Formula).returns(String) }
 | 
			
		||||
  def self.gnu_tar(gnu_tar_formula)
 | 
			
		||||
    "#{gnu_tar_formula.opt_bin}/gtar"
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,6 @@
 | 
			
		||||
# typed: true
 | 
			
		||||
# frozen_string_literal: true
 | 
			
		||||
 | 
			
		||||
require "livecheck/livecheck"
 | 
			
		||||
 | 
			
		||||
module Homebrew
 | 
			
		||||
  module Livecheck
 | 
			
		||||
    # The `Livecheck::SkipConditions` module primarily contains methods that
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "extend/ENV"
 | 
			
		||||
 | 
			
		||||
describe "ENV" do
 | 
			
		||||
RSpec.describe "ENV" do
 | 
			
		||||
  shared_examples EnvActivation do
 | 
			
		||||
    subject(:env) { env_activation.extend(described_class) }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "PATH"
 | 
			
		||||
 | 
			
		||||
describe PATH do
 | 
			
		||||
RSpec.describe PATH do
 | 
			
		||||
  describe "#initialize" do
 | 
			
		||||
    it "can take multiple arguments" do
 | 
			
		||||
      expect(described_class.new("/path1", "/path2")).to eq("/path1:/path2")
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "api"
 | 
			
		||||
 | 
			
		||||
describe Homebrew::API::Cask do
 | 
			
		||||
RSpec.describe Homebrew::API::Cask do
 | 
			
		||||
  let(:cache_dir) { mktmpdir }
 | 
			
		||||
 | 
			
		||||
  before do
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "api"
 | 
			
		||||
 | 
			
		||||
describe Homebrew::API::Formula do
 | 
			
		||||
RSpec.describe Homebrew::API::Formula do
 | 
			
		||||
  let(:cache_dir) { mktmpdir }
 | 
			
		||||
 | 
			
		||||
  before do
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "api"
 | 
			
		||||
 | 
			
		||||
describe Homebrew::API do
 | 
			
		||||
RSpec.describe Homebrew::API do
 | 
			
		||||
  let(:text) { "foo" }
 | 
			
		||||
  let(:json) { '{"foo":"bar"}' }
 | 
			
		||||
  let(:json_hash) { JSON.parse(json) }
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "open3"
 | 
			
		||||
 | 
			
		||||
describe "Bash" do
 | 
			
		||||
RSpec.describe "Bash" do
 | 
			
		||||
  matcher :have_valid_bash_syntax do
 | 
			
		||||
    match do |file|
 | 
			
		||||
      stdout, stderr, status = Open3.capture3("/bin/bash", "-n", file)
 | 
			
		||||
 | 
			
		||||
@ -3,7 +3,7 @@
 | 
			
		||||
require "formula"
 | 
			
		||||
require "software_spec"
 | 
			
		||||
 | 
			
		||||
describe Bottle::Filename do
 | 
			
		||||
RSpec.describe Bottle::Filename do
 | 
			
		||||
  subject { described_class.new(name, version, tag, rebuild) }
 | 
			
		||||
 | 
			
		||||
  let(:name) { "user/repo/foo" }
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "build_environment"
 | 
			
		||||
 | 
			
		||||
describe BuildEnvironment do
 | 
			
		||||
RSpec.describe BuildEnvironment do
 | 
			
		||||
  let(:env) { described_class.new }
 | 
			
		||||
 | 
			
		||||
  describe "#<<" do
 | 
			
		||||
 | 
			
		||||
@ -3,7 +3,7 @@
 | 
			
		||||
require "build_options"
 | 
			
		||||
require "options"
 | 
			
		||||
 | 
			
		||||
describe BuildOptions do
 | 
			
		||||
RSpec.describe BuildOptions do
 | 
			
		||||
  alias_matcher :be_built_with, :be_with
 | 
			
		||||
  alias_matcher :be_built_without, :be_without
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "bump_version_parser"
 | 
			
		||||
 | 
			
		||||
describe Homebrew::BumpVersionParser do
 | 
			
		||||
RSpec.describe Homebrew::BumpVersionParser do
 | 
			
		||||
  let(:general_version) { "1.2.3" }
 | 
			
		||||
  let(:intel_version) { "2.3.4" }
 | 
			
		||||
  let(:arm_version) { "3.4.5" }
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "bundle_version"
 | 
			
		||||
 | 
			
		||||
describe Homebrew::BundleVersion do
 | 
			
		||||
RSpec.describe Homebrew::BundleVersion do
 | 
			
		||||
  describe "#<=>" do
 | 
			
		||||
    it "compares both the `short_version` and `version`" do
 | 
			
		||||
      expect(described_class.new("1.2.3", "3000")).to be < described_class.new("1.2.3", "4000")
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "cache_store"
 | 
			
		||||
 | 
			
		||||
describe CacheStoreDatabase do
 | 
			
		||||
RSpec.describe CacheStoreDatabase do
 | 
			
		||||
  subject(:sample_db) { described_class.new(:sample) }
 | 
			
		||||
 | 
			
		||||
  describe "self.use" do
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
# frozen_string_literal: true
 | 
			
		||||
 | 
			
		||||
describe Cask::Artifact::AbstractArtifact, :cask do
 | 
			
		||||
RSpec.describe Cask::Artifact::AbstractArtifact, :cask do
 | 
			
		||||
  describe ".read_script_arguments" do
 | 
			
		||||
    let(:stanza) { :installer }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
# frozen_string_literal: true
 | 
			
		||||
 | 
			
		||||
describe Cask::Artifact::App, :cask do
 | 
			
		||||
RSpec.describe Cask::Artifact::App, :cask do
 | 
			
		||||
  describe "activate to alternate target" do
 | 
			
		||||
    let(:cask) { Cask::CaskLoader.load(cask_path("with-alt-target")) }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
# 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(:command) { NeverSudoSystemCommand }
 | 
			
		||||
  let(:adopt) { false }
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
# frozen_string_literal: true
 | 
			
		||||
 | 
			
		||||
describe Cask::Artifact::Binary, :cask do
 | 
			
		||||
RSpec.describe Cask::Artifact::Binary, :cask do
 | 
			
		||||
  let(:cask) do
 | 
			
		||||
    Cask::CaskLoader.load(cask_path("with-binary")).tap do |cask|
 | 
			
		||||
      InstallHelper.install_without_artifacts(cask)
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
# 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(:install_phase) do
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
# frozen_string_literal: true
 | 
			
		||||
 | 
			
		||||
describe Cask::Artifact::Installer, :cask do
 | 
			
		||||
RSpec.describe Cask::Artifact::Installer, :cask do
 | 
			
		||||
  subject(:installer) { described_class.new(cask, **args) }
 | 
			
		||||
 | 
			
		||||
  let(:staged_path) { mktmpdir }
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
# frozen_string_literal: true
 | 
			
		||||
 | 
			
		||||
describe Cask::Artifact::Manpage, :cask do
 | 
			
		||||
RSpec.describe Cask::Artifact::Manpage, :cask do
 | 
			
		||||
  let(:cask) { Cask::CaskLoader.load(cask_token) }
 | 
			
		||||
 | 
			
		||||
  context "without section" do
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
# 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(:fake_system_command) { class_double(SystemCommand) }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
# frozen_string_literal: true
 | 
			
		||||
 | 
			
		||||
describe Cask::Artifact::PostflightBlock, :cask do
 | 
			
		||||
RSpec.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
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
# frozen_string_literal: true
 | 
			
		||||
 | 
			
		||||
describe Cask::Artifact::PreflightBlock, :cask do
 | 
			
		||||
RSpec.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
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "benchmark"
 | 
			
		||||
 | 
			
		||||
shared_examples "#uninstall_phase or #zap_phase" do
 | 
			
		||||
RSpec.shared_examples "#uninstall_phase or #zap_phase" do
 | 
			
		||||
  subject { artifact }
 | 
			
		||||
 | 
			
		||||
  let(:artifact_dsl_key) { described_class.dsl_key }
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
# 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(:install_phase) do
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
# frozen_string_literal: true
 | 
			
		||||
 | 
			
		||||
describe Cask::Artifact::App, :cask do
 | 
			
		||||
RSpec.describe Cask::Artifact::App, :cask do
 | 
			
		||||
  describe "multiple apps" do
 | 
			
		||||
    let(:cask) { Cask::CaskLoader.load(cask_path("with-two-apps-correct")) }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
# 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(:zap_artifact) do
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require_relative "shared_examples/uninstall_zap"
 | 
			
		||||
 | 
			
		||||
describe Cask::Artifact::Uninstall, :cask do
 | 
			
		||||
RSpec.describe Cask::Artifact::Uninstall, :cask do
 | 
			
		||||
  describe "#uninstall_phase" do
 | 
			
		||||
    include_examples "#uninstall_phase or #zap_phase"
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require_relative "shared_examples/uninstall_zap"
 | 
			
		||||
 | 
			
		||||
describe Cask::Artifact::Zap, :cask do
 | 
			
		||||
RSpec.describe Cask::Artifact::Zap, :cask do
 | 
			
		||||
  describe "#zap_phase" do
 | 
			
		||||
    include_examples "#uninstall_phase or #zap_phase"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "cask/audit"
 | 
			
		||||
 | 
			
		||||
describe Cask::Audit, :cask do
 | 
			
		||||
RSpec.describe Cask::Audit, :cask do
 | 
			
		||||
  def include_msg?(problems, msg)
 | 
			
		||||
    if msg.is_a?(Regexp)
 | 
			
		||||
      Array(problems).any? { |problem| msg.match?(problem[:message]) }
 | 
			
		||||
@ -472,7 +472,6 @@ describe Cask::Audit, :cask do
 | 
			
		||||
 | 
			
		||||
      before do
 | 
			
		||||
        allow(audit).to receive_messages(download: download_double, signing?: true)
 | 
			
		||||
        allow(audit).to receive(:check_https_availability)
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
      context "when cask is not using a signed artifact" do
 | 
			
		||||
@ -1024,7 +1023,6 @@ describe Cask::Audit, :cask do
 | 
			
		||||
 | 
			
		||||
      before do
 | 
			
		||||
        allow(audit).to receive(:download).and_return(download_double)
 | 
			
		||||
        allow(audit).to receive(:check_https_availability)
 | 
			
		||||
        allow(UnpackStrategy).to receive(:detect).and_return(nil)
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
# 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|
 | 
			
		||||
    let(:token) { new_token }
 | 
			
		||||
    let(:cask_from_source) { Cask::CaskLoader.load(token) }
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
# frozen_string_literal: true
 | 
			
		||||
 | 
			
		||||
describe Cask::CaskLoader::FromContentLoader do
 | 
			
		||||
RSpec.describe Cask::CaskLoader::FromContentLoader do
 | 
			
		||||
  describe "::try_new" do
 | 
			
		||||
    it "returns a loader for Casks specified with `cask \"token\" do … end`" do
 | 
			
		||||
      expect(described_class.try_new(<<~RUBY)).not_to be_nil
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
# frozen_string_literal: true
 | 
			
		||||
 | 
			
		||||
describe Cask::CaskLoader::FromPathLoader do
 | 
			
		||||
RSpec.describe Cask::CaskLoader::FromPathLoader do
 | 
			
		||||
  describe "#load" do
 | 
			
		||||
    context "when the file does not contain a cask" do
 | 
			
		||||
      let(:path) do
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
# frozen_string_literal: true
 | 
			
		||||
 | 
			
		||||
describe Cask::CaskLoader::FromTapLoader do
 | 
			
		||||
RSpec.describe Cask::CaskLoader::FromTapLoader do
 | 
			
		||||
  let(:cask_name) { "testball" }
 | 
			
		||||
  let(:cask_full_name) { "homebrew/cask/#{cask_name}" }
 | 
			
		||||
  let(:cask_path) { CoreCaskTap.instance.cask_dir/"#{cask_name}.rb" }
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
# frozen_string_literal: true
 | 
			
		||||
 | 
			
		||||
describe Cask::CaskLoader::FromURILoader do
 | 
			
		||||
RSpec.describe Cask::CaskLoader::FromURILoader do
 | 
			
		||||
  describe "::try_new" do
 | 
			
		||||
    it "returns a loader when given an URI" do
 | 
			
		||||
      expect(described_class.try_new(URI("https://brew.sh/"))).not_to be_nil
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
# frozen_string_literal: true
 | 
			
		||||
 | 
			
		||||
describe Cask::CaskLoader, :cask do
 | 
			
		||||
RSpec.describe Cask::CaskLoader, :cask do
 | 
			
		||||
  describe "::for" do
 | 
			
		||||
    let(:tap) { CoreCaskTap.instance }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
# frozen_string_literal: true
 | 
			
		||||
 | 
			
		||||
describe Cask::Cask, :cask do
 | 
			
		||||
RSpec.describe Cask::Cask, :cask do
 | 
			
		||||
  let(:cask) { described_class.new("versioned-cask") }
 | 
			
		||||
 | 
			
		||||
  context "when multiple versions are installed" do
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
# frozen_string_literal: true
 | 
			
		||||
 | 
			
		||||
describe Cask::Config, :cask do
 | 
			
		||||
RSpec.describe Cask::Config, :cask do
 | 
			
		||||
  subject(:config) { described_class.new }
 | 
			
		||||
 | 
			
		||||
  describe "::from_json" do
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
# frozen_string_literal: true
 | 
			
		||||
 | 
			
		||||
describe "conflicts_with", :cask do
 | 
			
		||||
RSpec.describe "conflicts_with", :cask do
 | 
			
		||||
  describe "conflicts_with cask" do
 | 
			
		||||
    let(:local_caffeine) do
 | 
			
		||||
      Cask::CaskLoader.load(cask_path("local-caffeine"))
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "cask/denylist"
 | 
			
		||||
 | 
			
		||||
describe Cask::Denylist, :cask do
 | 
			
		||||
RSpec.describe Cask::Denylist, :cask do
 | 
			
		||||
  describe "::reason" do
 | 
			
		||||
    matcher :disallow do |name|
 | 
			
		||||
      match do |expected|
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
# 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
 | 
			
		||||
RSpec.describe "Satisfy Dependencies and Requirements", :cask do
 | 
			
		||||
  subject(:install) do
 | 
			
		||||
    Cask::Installer.new(cask).install
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,7 @@
 | 
			
		||||
# frozen_string_literal: true
 | 
			
		||||
 | 
			
		||||
module Cask
 | 
			
		||||
  describe Download, :cask do
 | 
			
		||||
  RSpec.describe Download, :cask do
 | 
			
		||||
    describe "#verify_download_integrity" do
 | 
			
		||||
      subject(:verification) { described_class.new(cask).verify_download_integrity(downloaded_path) }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
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) }
 | 
			
		||||
 | 
			
		||||
  let(:cask) { Cask::CaskLoader.load(cask_path("basic-cask")) }
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "test/cask/dsl/shared_examples/base"
 | 
			
		||||
 | 
			
		||||
describe Cask::DSL::Container do
 | 
			
		||||
RSpec.describe Cask::DSL::Container do
 | 
			
		||||
  subject(:container) { described_class.new(**params) }
 | 
			
		||||
 | 
			
		||||
  describe "#pairs" do
 | 
			
		||||
 | 
			
		||||
@ -3,7 +3,7 @@
 | 
			
		||||
require "test/cask/dsl/shared_examples/base"
 | 
			
		||||
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(:fake_system_command) { class_double(SystemCommand) }
 | 
			
		||||
  let(:dsl) { described_class.new(cask, fake_system_command) }
 | 
			
		||||
 | 
			
		||||
@ -3,7 +3,7 @@
 | 
			
		||||
require "test/cask/dsl/shared_examples/base"
 | 
			
		||||
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(:fake_system_command) { class_double(SystemCommand) }
 | 
			
		||||
  let(:dsl) { described_class.new(cask, fake_system_command) }
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "cask/dsl/base"
 | 
			
		||||
 | 
			
		||||
shared_examples Cask::DSL::Base do
 | 
			
		||||
RSpec.shared_examples Cask::DSL::Base do
 | 
			
		||||
  it "supports the token method" do
 | 
			
		||||
    expect(dsl.token).to eq(cask.token)
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "cask/staged"
 | 
			
		||||
 | 
			
		||||
shared_examples Cask::Staged do
 | 
			
		||||
RSpec.shared_examples Cask::Staged do
 | 
			
		||||
  let(:existing_path) { Pathname("/path/to/file/that/exists") }
 | 
			
		||||
  let(:non_existent_path) { Pathname("/path/to/file/that/does/not/exist") }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
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(:dsl) { described_class.new(cask, class_double(SystemCommand)) }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -3,7 +3,7 @@
 | 
			
		||||
require "test/cask/dsl/shared_examples/base"
 | 
			
		||||
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(:fake_system_command) { class_double(SystemCommand) }
 | 
			
		||||
  let(:dsl) { described_class.new(cask, fake_system_command) }
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
# 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|
 | 
			
		||||
    expectations.each do |input_value, expected_output|
 | 
			
		||||
      context "when #{input_name} is #{input_value.inspect}" do
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
# frozen_string_literal: true
 | 
			
		||||
 | 
			
		||||
describe Cask::DSL, :cask do
 | 
			
		||||
RSpec.describe Cask::DSL, :cask do
 | 
			
		||||
  let(:cask) { Cask::CaskLoader.load(token) }
 | 
			
		||||
  let(:token) { "basic-cask" }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "utils"
 | 
			
		||||
 | 
			
		||||
describe Cask::Info, :cask do
 | 
			
		||||
RSpec.describe Cask::Info, :cask do
 | 
			
		||||
  it "displays some nice info about the specified Cask" do
 | 
			
		||||
    expect do
 | 
			
		||||
      described_class.info(Cask::CaskLoader.load("local-transmission"))
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
# frozen_string_literal: true
 | 
			
		||||
 | 
			
		||||
describe Cask::Installer, :cask do
 | 
			
		||||
RSpec.describe Cask::Installer, :cask do
 | 
			
		||||
  describe "install" do
 | 
			
		||||
    it "downloads and installs a nice fresh Cask" do
 | 
			
		||||
      caffeine = Cask::CaskLoader.load(cask_path("local-caffeine"))
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "cask/list"
 | 
			
		||||
 | 
			
		||||
describe Cask::List, :cask do
 | 
			
		||||
RSpec.describe Cask::List, :cask do
 | 
			
		||||
  it "lists the installed Casks in a pretty fashion" do
 | 
			
		||||
    casks = %w[local-caffeine local-transmission].map { |c| Cask::CaskLoader.load(c) }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
# frozen_string_literal: true
 | 
			
		||||
 | 
			
		||||
describe MacOS, :cask do
 | 
			
		||||
RSpec.describe MacOS, :cask do
 | 
			
		||||
  it "says '/' is undeletable" do
 | 
			
		||||
    expect(described_class).to be_undeletable(
 | 
			
		||||
      "/",
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
# frozen_string_literal: true
 | 
			
		||||
 | 
			
		||||
describe Cask::Pkg, :cask do
 | 
			
		||||
RSpec.describe Cask::Pkg, :cask do
 | 
			
		||||
  describe "#uninstall" do
 | 
			
		||||
    let(:fake_system_command) { NeverSudoSystemCommand }
 | 
			
		||||
    let(:empty_response) do
 | 
			
		||||
 | 
			
		||||
@ -3,7 +3,7 @@
 | 
			
		||||
require "cask/installer"
 | 
			
		||||
require "cask/reinstall"
 | 
			
		||||
 | 
			
		||||
describe Cask::Reinstall, :cask do
 | 
			
		||||
RSpec.describe Cask::Reinstall, :cask do
 | 
			
		||||
  it "displays the reinstallation progress" do
 | 
			
		||||
    caffeine = Cask::CaskLoader.load(cask_path("local-caffeine"))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "cask/uninstall"
 | 
			
		||||
 | 
			
		||||
describe Cask::Uninstall, :cask do
 | 
			
		||||
RSpec.describe Cask::Uninstall, :cask do
 | 
			
		||||
  it "displays the uninstallation progress" do
 | 
			
		||||
    caffeine = Cask::CaskLoader.load(cask_path("local-caffeine"))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "cask/upgrade"
 | 
			
		||||
 | 
			
		||||
describe Cask::Upgrade, :cask do
 | 
			
		||||
RSpec.describe Cask::Upgrade, :cask do
 | 
			
		||||
  let(:version_latest_paths) do
 | 
			
		||||
    [
 | 
			
		||||
      version_latest.config.appdir.join("Caffeine Mini.app"),
 | 
			
		||||
@ -25,8 +25,6 @@ describe Cask::Upgrade, :cask do
 | 
			
		||||
    installed.each do |cask|
 | 
			
		||||
      Cask::Installer.new(Cask::CaskLoader.load(cask_path(cask))).install
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    allow_any_instance_of(described_class).to receive(:verbose?).and_return(true)
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  context "when the upgrade is a dry run" do
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
# frozen_string_literal: true
 | 
			
		||||
 | 
			
		||||
describe Cask::Utils do
 | 
			
		||||
RSpec.describe Cask::Utils do
 | 
			
		||||
  let(:command) { NeverSudoSystemCommand }
 | 
			
		||||
  let(:dir) { mktmpdir }
 | 
			
		||||
  let(:path) { dir/"a/b/c" }
 | 
			
		||||
 | 
			
		||||
@ -3,7 +3,7 @@
 | 
			
		||||
require "cask/cask_loader"
 | 
			
		||||
require "cask_dependent"
 | 
			
		||||
 | 
			
		||||
describe CaskDependent, :needs_macos do
 | 
			
		||||
RSpec.describe CaskDependent, :needs_macos do
 | 
			
		||||
  subject(:dependent) { described_class.new test_cask }
 | 
			
		||||
 | 
			
		||||
  let :test_cask do
 | 
			
		||||
 | 
			
		||||
@ -3,7 +3,7 @@
 | 
			
		||||
require "formula"
 | 
			
		||||
require "caveats"
 | 
			
		||||
 | 
			
		||||
describe Caveats do
 | 
			
		||||
RSpec.describe Caveats do
 | 
			
		||||
  subject(:caveats) { described_class.new(f) }
 | 
			
		||||
 | 
			
		||||
  let(:f) { formula { url "foo-1.0" } }
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "checksum"
 | 
			
		||||
 | 
			
		||||
describe Checksum do
 | 
			
		||||
RSpec.describe Checksum do
 | 
			
		||||
  describe "#empty?" do
 | 
			
		||||
    subject { described_class.new("") }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "formula"
 | 
			
		||||
 | 
			
		||||
describe Formula do
 | 
			
		||||
RSpec.describe Formula do
 | 
			
		||||
  def formula(&block)
 | 
			
		||||
    super do
 | 
			
		||||
      url "file://#{TEST_FIXTURE_DIR}/tarballs/testball-0.1.tbz"
 | 
			
		||||
 | 
			
		||||
@ -3,7 +3,7 @@
 | 
			
		||||
require "cleaner"
 | 
			
		||||
require "formula"
 | 
			
		||||
 | 
			
		||||
describe Cleaner do
 | 
			
		||||
RSpec.describe Cleaner do
 | 
			
		||||
  include FileUtils
 | 
			
		||||
 | 
			
		||||
  describe "#clean" do
 | 
			
		||||
 | 
			
		||||
@ -5,7 +5,7 @@ require "cleanup"
 | 
			
		||||
require "cask/cache"
 | 
			
		||||
require "fileutils"
 | 
			
		||||
 | 
			
		||||
describe Homebrew::Cleanup do
 | 
			
		||||
RSpec.describe Homebrew::Cleanup do
 | 
			
		||||
  subject(:cleanup) { described_class.new }
 | 
			
		||||
 | 
			
		||||
  let(:ds_store) { Pathname.new("#{HOMEBREW_CELLAR}/.DS_Store") }
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "cli/named_args"
 | 
			
		||||
 | 
			
		||||
describe Homebrew::CLI::NamedArgs do
 | 
			
		||||
RSpec.describe Homebrew::CLI::NamedArgs do
 | 
			
		||||
  def setup_unredable_formula(name)
 | 
			
		||||
    error = FormulaUnreadableError.new(name, RuntimeError.new("testing"))
 | 
			
		||||
    allow(Formulary).to receive(:factory).with(name, any_args).and_raise(error)
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require_relative "../../cli/parser"
 | 
			
		||||
 | 
			
		||||
describe Homebrew::CLI::Parser do
 | 
			
		||||
RSpec.describe Homebrew::CLI::Parser do
 | 
			
		||||
  describe "test switch options" do
 | 
			
		||||
    subject(:parser) do
 | 
			
		||||
      described_class.new do
 | 
			
		||||
@ -235,14 +235,18 @@ describe Homebrew::CLI::Parser do
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    it "prioritizes cli arguments over env vars when they conflict" do
 | 
			
		||||
      allow(Homebrew::EnvConfig).to receive_messages(switch_a?: true, switch_b?: false)
 | 
			
		||||
      without_partial_double_verification do
 | 
			
		||||
        allow(Homebrew::EnvConfig).to receive_messages(switch_a?: true, switch_b?: false)
 | 
			
		||||
      end
 | 
			
		||||
      args = parser.parse(["--switch-b"])
 | 
			
		||||
      expect(args.switch_a?).to be false
 | 
			
		||||
      expect(args).to be_switch_b
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    it "raises an exception on constraint violation when both are env vars" do
 | 
			
		||||
      allow(Homebrew::EnvConfig).to receive_messages(switch_a?: true, switch_b?: true)
 | 
			
		||||
      without_partial_double_verification do
 | 
			
		||||
        allow(Homebrew::EnvConfig).to receive_messages(switch_a?: true, switch_b?: true)
 | 
			
		||||
      end
 | 
			
		||||
      expect { parser.parse([]) }.to raise_error(Homebrew::CLI::OptionConflictError)
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "cmd/shared_examples/args_parse"
 | 
			
		||||
 | 
			
		||||
describe "brew --cache" do
 | 
			
		||||
RSpec.describe "brew --cache" do
 | 
			
		||||
  it_behaves_like "parseable arguments"
 | 
			
		||||
 | 
			
		||||
  it "prints all cache files for a given Formula", :integration_test do
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "cmd/shared_examples/args_parse"
 | 
			
		||||
 | 
			
		||||
describe "brew --caskroom" do
 | 
			
		||||
RSpec.describe "brew --caskroom" do
 | 
			
		||||
  it_behaves_like "parseable arguments"
 | 
			
		||||
 | 
			
		||||
  it "prints Homebrew's Caskroom", :integration_test do
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "cmd/shared_examples/args_parse"
 | 
			
		||||
 | 
			
		||||
describe "brew --cellar" do
 | 
			
		||||
RSpec.describe "brew --cellar" do
 | 
			
		||||
  it_behaves_like "parseable arguments"
 | 
			
		||||
 | 
			
		||||
  it "prints Homebrew's Cellar", :integration_test do
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "cmd/shared_examples/args_parse"
 | 
			
		||||
 | 
			
		||||
describe "brew --env" do
 | 
			
		||||
RSpec.describe "brew --env" do
 | 
			
		||||
  it_behaves_like "parseable arguments"
 | 
			
		||||
 | 
			
		||||
  describe "--shell=bash", :integration_test do
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "cmd/shared_examples/args_parse"
 | 
			
		||||
 | 
			
		||||
describe "brew --prefix" do
 | 
			
		||||
RSpec.describe "brew --prefix" do
 | 
			
		||||
  it_behaves_like "parseable arguments"
 | 
			
		||||
 | 
			
		||||
  it "prints Homebrew's prefix", :integration_test do
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "cmd/shared_examples/args_parse"
 | 
			
		||||
 | 
			
		||||
describe "brew --repository" do
 | 
			
		||||
RSpec.describe "brew --repository" do
 | 
			
		||||
  it_behaves_like "parseable arguments"
 | 
			
		||||
 | 
			
		||||
  it "prints Homebrew's repository", :integration_test do
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "cmd/shared_examples/args_parse"
 | 
			
		||||
 | 
			
		||||
describe "brew --version" do
 | 
			
		||||
RSpec.describe "brew --version" do
 | 
			
		||||
  it "prints the Homebrew's version", :integration_test do
 | 
			
		||||
    expect { brew_sh "--version" }
 | 
			
		||||
      .to output(/^Homebrew #{Regexp.escape(HOMEBREW_VERSION)}\n/o).to_stdout
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "cmd/shared_examples/args_parse"
 | 
			
		||||
 | 
			
		||||
describe "brew analytics" do
 | 
			
		||||
RSpec.describe "brew analytics" do
 | 
			
		||||
  it_behaves_like "parseable arguments"
 | 
			
		||||
 | 
			
		||||
  it "when HOMEBREW_NO_ANALYTICS is unset is disabled after running `brew analytics off`", :integration_test do
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "cmd/shared_examples/args_parse"
 | 
			
		||||
 | 
			
		||||
describe "brew autoremove" do
 | 
			
		||||
RSpec.describe "brew autoremove" do
 | 
			
		||||
  it_behaves_like "parseable arguments"
 | 
			
		||||
 | 
			
		||||
  describe "integration test" do
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
# frozen_string_literal: true
 | 
			
		||||
 | 
			
		||||
describe "brew bundle", :integration_test do
 | 
			
		||||
RSpec.describe "brew bundle", :integration_test do
 | 
			
		||||
  describe "check" do
 | 
			
		||||
    it "checks if a Brewfile's dependencies are satisfied", :needs_network do
 | 
			
		||||
      setup_remote_tap "homebrew/bundle"
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "cmd/shared_examples/args_parse"
 | 
			
		||||
 | 
			
		||||
describe "brew cleanup" do
 | 
			
		||||
RSpec.describe "brew cleanup" do
 | 
			
		||||
  before do
 | 
			
		||||
    FileUtils.mkdir_p HOMEBREW_LIBRARY/"Homebrew/vendor/"
 | 
			
		||||
    FileUtils.touch HOMEBREW_LIBRARY/"Homebrew/vendor/portable-ruby-version"
 | 
			
		||||
 | 
			
		||||
@ -5,7 +5,7 @@ require "fileutils"
 | 
			
		||||
 | 
			
		||||
require "cmd/shared_examples/args_parse"
 | 
			
		||||
 | 
			
		||||
describe "brew commands" do
 | 
			
		||||
RSpec.describe "brew commands" do
 | 
			
		||||
  it_behaves_like "parseable arguments"
 | 
			
		||||
 | 
			
		||||
  it "prints a list of all available commands", :integration_test do
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "cmd/shared_examples/args_parse"
 | 
			
		||||
 | 
			
		||||
describe "brew completions" do
 | 
			
		||||
RSpec.describe "brew completions" do
 | 
			
		||||
  it_behaves_like "parseable arguments"
 | 
			
		||||
 | 
			
		||||
  it "runs the status subcommand correctly", :integration_test do
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "cmd/shared_examples/args_parse"
 | 
			
		||||
 | 
			
		||||
describe "brew config" do
 | 
			
		||||
RSpec.describe "brew config" do
 | 
			
		||||
  it_behaves_like "parseable arguments"
 | 
			
		||||
 | 
			
		||||
  it "prints information about the current Homebrew configuration", :integration_test do
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
# 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
 | 
			
		||||
    mktmpdir do |path|
 | 
			
		||||
      cmd = "custom-external-command-#{rand}"
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "cmd/shared_examples/args_parse"
 | 
			
		||||
 | 
			
		||||
describe "brew deps" do
 | 
			
		||||
RSpec.describe "brew deps" do
 | 
			
		||||
  it_behaves_like "parseable arguments"
 | 
			
		||||
 | 
			
		||||
  it "outputs all of a Formula's dependencies and their dependencies on separate lines", :integration_test do
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "cmd/shared_examples/args_parse"
 | 
			
		||||
 | 
			
		||||
describe "brew desc" do
 | 
			
		||||
RSpec.describe "brew desc" do
 | 
			
		||||
  it_behaves_like "parseable arguments"
 | 
			
		||||
 | 
			
		||||
  it "shows a given Formula's description", :integration_test do
 | 
			
		||||
 | 
			
		||||
@ -2,6 +2,6 @@
 | 
			
		||||
 | 
			
		||||
require "cmd/shared_examples/args_parse"
 | 
			
		||||
 | 
			
		||||
describe "brew developer" do
 | 
			
		||||
RSpec.describe "brew developer" do
 | 
			
		||||
  it_behaves_like "parseable arguments"
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
# frozen_string_literal: true
 | 
			
		||||
 | 
			
		||||
describe "brew docs" do
 | 
			
		||||
RSpec.describe "brew docs" do
 | 
			
		||||
  it "opens the docs page", :integration_test do
 | 
			
		||||
    expect { brew "docs", "HOMEBREW_BROWSER" => "echo" }
 | 
			
		||||
      .to output("https://docs.brew.sh\n").to_stdout
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "cmd/shared_examples/args_parse"
 | 
			
		||||
 | 
			
		||||
describe "brew doctor" do
 | 
			
		||||
RSpec.describe "brew doctor" do
 | 
			
		||||
  it_behaves_like "parseable arguments"
 | 
			
		||||
 | 
			
		||||
  specify "check_integration_test", :integration_test do
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "cmd/shared_examples/args_parse"
 | 
			
		||||
 | 
			
		||||
describe "brew fetch" do
 | 
			
		||||
RSpec.describe "brew fetch" do
 | 
			
		||||
  it_behaves_like "parseable arguments"
 | 
			
		||||
 | 
			
		||||
  it "downloads the Formula's URL", :integration_test do
 | 
			
		||||
 | 
			
		||||
@ -2,6 +2,6 @@
 | 
			
		||||
 | 
			
		||||
require "cmd/shared_examples/args_parse"
 | 
			
		||||
 | 
			
		||||
describe "brew gist-logs" do
 | 
			
		||||
RSpec.describe "brew gist-logs" do
 | 
			
		||||
  it_behaves_like "parseable arguments"
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
# frozen_string_literal: true
 | 
			
		||||
 | 
			
		||||
describe "brew", :integration_test do
 | 
			
		||||
RSpec.describe "brew", :integration_test do
 | 
			
		||||
  describe "help" do
 | 
			
		||||
    it "prints help for a documented Ruby command" do
 | 
			
		||||
      expect { brew "help", "cat" }
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "cmd/shared_examples/args_parse"
 | 
			
		||||
 | 
			
		||||
describe "brew home" do
 | 
			
		||||
RSpec.describe "brew home" do
 | 
			
		||||
  let(:testballhome_homepage) do
 | 
			
		||||
    Formula["testballhome"].homepage
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
@ -4,7 +4,7 @@ require "cmd/info"
 | 
			
		||||
 | 
			
		||||
require "cmd/shared_examples/args_parse"
 | 
			
		||||
 | 
			
		||||
describe "brew info" do
 | 
			
		||||
RSpec.describe "brew info" do
 | 
			
		||||
  it_behaves_like "parseable arguments"
 | 
			
		||||
 | 
			
		||||
  it "prints as json with the --json=v1 flag", :integration_test do
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "cmd/shared_examples/args_parse"
 | 
			
		||||
 | 
			
		||||
describe "brew install" do
 | 
			
		||||
RSpec.describe "brew install" do
 | 
			
		||||
  it_behaves_like "parseable arguments"
 | 
			
		||||
 | 
			
		||||
  it "installs formulae", :integration_test do
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "cmd/shared_examples/args_parse"
 | 
			
		||||
 | 
			
		||||
describe "brew leaves" do
 | 
			
		||||
RSpec.describe "brew leaves" do
 | 
			
		||||
  it_behaves_like "parseable arguments"
 | 
			
		||||
 | 
			
		||||
  context "when there are no installed Formulae", :integration_test do
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "cmd/shared_examples/args_parse"
 | 
			
		||||
 | 
			
		||||
describe "brew link" do
 | 
			
		||||
RSpec.describe "brew link" do
 | 
			
		||||
  it_behaves_like "parseable arguments"
 | 
			
		||||
 | 
			
		||||
  it "links a given Formula", :integration_test do
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "cmd/shared_examples/args_parse"
 | 
			
		||||
 | 
			
		||||
describe "brew list" do
 | 
			
		||||
RSpec.describe "brew list" do
 | 
			
		||||
  let(:formulae) { %w[bar foo qux] }
 | 
			
		||||
 | 
			
		||||
  it_behaves_like "parseable arguments"
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
require "cmd/shared_examples/args_parse"
 | 
			
		||||
 | 
			
		||||
describe "brew log" do
 | 
			
		||||
RSpec.describe "brew log" do
 | 
			
		||||
  it_behaves_like "parseable arguments"
 | 
			
		||||
 | 
			
		||||
  it "shows the Git log for a given Formula", :integration_test do
 | 
			
		||||
 | 
			
		||||
Some files were not shown because too many files have changed in this diff Show More
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user