diff options
Diffstat (limited to 'Library/Homebrew/test')
| -rw-r--r-- | Library/Homebrew/test/Gemfile | 1 | ||||
| -rw-r--r-- | Library/Homebrew/test/Gemfile.lock | 17 | ||||
| -rw-r--r-- | Library/Homebrew/test/cask/dsl_spec.rb | 5 | ||||
| -rw-r--r-- | Library/Homebrew/test/cmd/style_spec.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/test/dependency_collector_spec.rb | 5 | ||||
| -rw-r--r-- | Library/Homebrew/test/formula_installer_spec.rb | 60 | ||||
| -rw-r--r-- | Library/Homebrew/test/mpi_requirement_spec.rb | 9 | ||||
| -rw-r--r-- | Library/Homebrew/test/support/helper/output_as_tty.rb | 4 | 
8 files changed, 17 insertions, 86 deletions
diff --git a/Library/Homebrew/test/Gemfile b/Library/Homebrew/test/Gemfile index 2dcb670aa..b6d1405ff 100644 --- a/Library/Homebrew/test/Gemfile +++ b/Library/Homebrew/test/Gemfile @@ -3,7 +3,6 @@ source "https://rubygems.org"  require_relative "../constants"  gem "parallel_tests" -gem "parser", HOMEBREW_RUBOCOP_PARSER_VERSION  gem "rspec"  gem "rspec-its", require: false  gem "rspec-wait", require: false diff --git a/Library/Homebrew/test/Gemfile.lock b/Library/Homebrew/test/Gemfile.lock index 9ddc18e71..47f51e56b 100644 --- a/Library/Homebrew/test/Gemfile.lock +++ b/Library/Homebrew/test/Gemfile.lock @@ -12,12 +12,10 @@ GEM      parallel (1.12.0)      parallel_tests (2.17.0)        parallel -    parser (2.4.0.0) -      ast (~> 2.2) +    parser (2.4.0.2) +      ast (~> 2.3)      powerpack (0.1.1) -    rainbow (2.2.2) -      rake -    rake (12.1.0) +    rainbow (3.0.0)      rspec (3.6.0)        rspec-core (~> 3.6.0)        rspec-expectations (~> 3.6.0) @@ -36,11 +34,11 @@ GEM      rspec-support (3.6.0)      rspec-wait (0.0.9)        rspec (>= 3, < 4) -    rubocop (0.51.0) +    rubocop (0.52.1)        parallel (~> 1.10) -      parser (>= 2.3.3.1, < 3.0) +      parser (>= 2.4.0.2, < 3.0)        powerpack (~> 0.1) -      rainbow (>= 2.2.2, < 3.0) +      rainbow (>= 2.2.2, < 4.0)        ruby-progressbar (~> 1.7)        unicode-display_width (~> 1.0, >= 1.0.1)      ruby-progressbar (1.9.0) @@ -58,11 +56,10 @@ PLATFORMS  DEPENDENCIES    codecov    parallel_tests -  parser (= 2.4.0.0)    rspec    rspec-its    rspec-wait -  rubocop (= 0.51.0) +  rubocop (= 0.52.1)    simplecov  BUNDLED WITH diff --git a/Library/Homebrew/test/cask/dsl_spec.rb b/Library/Homebrew/test/cask/dsl_spec.rb index a17acfca6..cd296b5ab 100644 --- a/Library/Homebrew/test/cask/dsl_spec.rb +++ b/Library/Homebrew/test/cask/dsl_spec.rb @@ -232,8 +232,9 @@ describe Hbc::DSL, :cask do        expect(cask.caveats).to be_empty        cask = Hbc::Cask.new("cask-with-caveats") do -        def caveats; <<~EOS -          When you install this Cask, you probably want to know this. +        def caveats +          <<~EOS +            When you install this Cask, you probably want to know this.            EOS          end        end diff --git a/Library/Homebrew/test/cmd/style_spec.rb b/Library/Homebrew/test/cmd/style_spec.rb index 5c118f32e..61faa4af2 100644 --- a/Library/Homebrew/test/cmd/style_spec.rb +++ b/Library/Homebrew/test/cmd/style_spec.rb @@ -28,7 +28,7 @@ describe "brew style" do        rubocop_result = Homebrew.check_style_json([formula])        expect(rubocop_result.file_offenses(formula.realpath.to_s).map(&:message)) -        .to include("Extra empty line detected at class body beginning.") +        .to include("Layout/EmptyLinesAroundClassBody: Extra empty line detected at class body beginning.")      end    end  end diff --git a/Library/Homebrew/test/dependency_collector_spec.rb b/Library/Homebrew/test/dependency_collector_spec.rb index 216bbf316..0f182a69e 100644 --- a/Library/Homebrew/test/dependency_collector_spec.rb +++ b/Library/Homebrew/test/dependency_collector_spec.rb @@ -66,11 +66,6 @@ describe DependencyCollector do        expect(dep).to be_optional      end -    specify "ant dependency", :needs_compat do -      subject.add ant: :build -      expect(find_dependency("ant")).to eq(Dependency.new("ant", [:build])) -    end -      it "doesn't mutate the dependency spec" do        spec = { "foo" => :optional }        copy = spec.dup diff --git a/Library/Homebrew/test/formula_installer_spec.rb b/Library/Homebrew/test/formula_installer_spec.rb index d3710a4cb..93f23b18f 100644 --- a/Library/Homebrew/test/formula_installer_spec.rb +++ b/Library/Homebrew/test/formula_installer_spec.rb @@ -132,64 +132,4 @@ describe FormulaInstaller do        fi.check_install_sanity      }.to raise_error(CannotInstallFormulaError)    end - -  describe "#install_requirement_formula?", :needs_compat do -    before do -      @requirement = Python3Requirement.new -      @requirement_dependency = @requirement.to_dependency -      @install_bottle_for_dependent = false -      allow(@requirement).to receive(:satisfied?).and_return(satisfied?) -      allow(@requirement).to receive(:satisfied_by_formula?).and_return(satisfied_by_formula?) -      allow(@requirement).to receive(:build?).and_return(build?) -      @dependent = formula do -        url "foo" -        version "0.1" -        depends_on :python3 -      end -      allow(@dependent).to receive(:installed?).and_return(installed?) -      @fi = FormulaInstaller.new(@dependent) -    end - -    subject { @fi.install_requirement_formula?(@requirement_dependency, @requirement, @dependent, @install_bottle_for_dependent) } - -    context "it returns false when requirement is satisfied" do -      let(:satisfied?) { true } -      let(:satisfied_by_formula?) { false } -      let(:build?) { false } -      let(:installed?) { false } -      it { is_expected.to be false } -    end - -    context "it returns false when requirement is satisfied but default formula is installed" do -      let(:satisfied?) { true } -      let(:satisfied_by_formula?) { false } -      let(:build?) { false } -      let(:installed?) { false } -      it { is_expected.to be false } -    end - -    context "it returns false when requirement is :build and dependent is installed" do -      let(:satisfied?) { false } -      let(:satisfied_by_formula?) { false } -      let(:build?) { true } -      let(:installed?) { true } -      it { is_expected.to be false } -    end - -    context "it returns true when requirement isn't satisfied" do -      let(:satisfied?) { false } -      let(:satisfied_by_formula?) { false } -      let(:build?) { false } -      let(:installed?) { false } -      it { is_expected.to be true } -    end - -    context "it returns true when requirement is satisfied by a formula" do -      let(:satisfied?) { true } -      let(:satisfied_by_formula?) { true } -      let(:build?) { false } -      let(:installed?) { false } -      it { is_expected.to be true } -    end -  end  end diff --git a/Library/Homebrew/test/mpi_requirement_spec.rb b/Library/Homebrew/test/mpi_requirement_spec.rb index 87f99eb3a..aecdb1b66 100644 --- a/Library/Homebrew/test/mpi_requirement_spec.rb +++ b/Library/Homebrew/test/mpi_requirement_spec.rb @@ -1,14 +1,13 @@ -require "compat/requirements/mpi_requirement" +require "compat/requirements"  describe MPIRequirement, :needs_compat do    describe "::new" do -    subject { described_class.new(*(wrappers + tags)) } +    subject { described_class.new(wrappers + tags) }      let(:wrappers) { [:cc, :cxx, :f77] }      let(:tags) { [:optional, "some-other-tag"] } -    it "untangles wrappers and tags" do -      expect(subject.lang_list).to eq(wrappers) -      expect(subject.tags).to eq(tags) +    it "stores wrappers as tags" do +      expect(subject.tags).to eq(wrappers + tags)      end    end  end diff --git a/Library/Homebrew/test/support/helper/output_as_tty.rb b/Library/Homebrew/test/support/helper/output_as_tty.rb index aa9da73cc..22f96510e 100644 --- a/Library/Homebrew/test/support/helper/output_as_tty.rb +++ b/Library/Homebrew/test/support/helper/output_as_tty.rb @@ -19,7 +19,7 @@ module Test            return super(block) unless @tty            colored_tty_block = lambda do -            instance_eval("$#{@output}").extend(Module.new do +            instance_eval("$#{@output}", __FILE__, __LINE__).extend(Module.new do                def tty?                  true                end @@ -32,7 +32,7 @@ module Test            return super(colored_tty_block) if @colors            uncolored_tty_block = lambda do -            instance_eval <<-EOS +            instance_eval <<-EOS, __FILE__, __LINE__ + 1                begin                  captured_stream = StringIO.new  | 
