diff --git a/Library/Homebrew/test/cask/artifact/shared_examples/uninstall_zap.rb b/Library/Homebrew/test/cask/artifact/shared_examples/uninstall_zap.rb index e74061835b..892785f3e8 100644 --- a/Library/Homebrew/test/cask/artifact/shared_examples/uninstall_zap.rb +++ b/Library/Homebrew/test/cask/artifact/shared_examples/uninstall_zap.rb @@ -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 } diff --git a/Library/Homebrew/test/cask/dsl/shared_examples/base.rb b/Library/Homebrew/test/cask/dsl/shared_examples/base.rb index c46715d516..b7871d0215 100644 --- a/Library/Homebrew/test/cask/dsl/shared_examples/base.rb +++ b/Library/Homebrew/test/cask/dsl/shared_examples/base.rb @@ -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 diff --git a/Library/Homebrew/test/cask/dsl/shared_examples/staged.rb b/Library/Homebrew/test/cask/dsl/shared_examples/staged.rb index b62959ec2e..f8c2b5b923 100644 --- a/Library/Homebrew/test/cask/dsl/shared_examples/staged.rb +++ b/Library/Homebrew/test/cask/dsl/shared_examples/staged.rb @@ -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") } diff --git a/Library/Homebrew/test/cmd/shared_examples/args_parse.rb b/Library/Homebrew/test/cmd/shared_examples/args_parse.rb index cc854c9edb..efce6f3e96 100644 --- a/Library/Homebrew/test/cmd/shared_examples/args_parse.rb +++ b/Library/Homebrew/test/cmd/shared_examples/args_parse.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -shared_examples "parseable arguments" do +RSpec.shared_examples "parseable arguments" do subject(:method_name) { "#{command_name.tr("-", "_")}_args" } let(:command_name) do |example| diff --git a/Library/Homebrew/test/support/helper/spec/shared_examples/formulae_exist.rb b/Library/Homebrew/test/support/helper/spec/shared_examples/formulae_exist.rb index 9dcbf60b31..8b39d54fc8 100644 --- a/Library/Homebrew/test/support/helper/spec/shared_examples/formulae_exist.rb +++ b/Library/Homebrew/test/support/helper/spec/shared_examples/formulae_exist.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -shared_examples "formulae exist" do |array| +RSpec.shared_examples "formulae exist" do |array| array.each do |f| it "#{f} formula exists" do core_tap = Pathname("#{HOMEBREW_LIBRARY_PATH}/../Taps/homebrew/homebrew-core") diff --git a/Library/Homebrew/test/unpack_strategy/shared_examples.rb b/Library/Homebrew/test/unpack_strategy/shared_examples.rb index 6f3caa475c..f3790fdd08 100644 --- a/Library/Homebrew/test/unpack_strategy/shared_examples.rb +++ b/Library/Homebrew/test/unpack_strategy/shared_examples.rb @@ -2,13 +2,13 @@ require "unpack_strategy" -shared_examples "UnpackStrategy::detect" do +RSpec.shared_examples "UnpackStrategy::detect" do it "is correctly detected" do expect(UnpackStrategy.detect(path)).to be_a described_class end end -shared_examples "#extract" do |children: []| +RSpec.shared_examples "#extract" do |children: []| specify "#extract" do mktmpdir do |unpack_dir| described_class.new(path).extract(to: unpack_dir)