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

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

View File

@ -2,7 +2,7 @@
require "benchmark" require "benchmark"
shared_examples "#uninstall_phase or #zap_phase" do RSpec.shared_examples "#uninstall_phase or #zap_phase" do
subject { artifact } subject { artifact }
let(:artifact_dsl_key) { described_class.dsl_key } let(:artifact_dsl_key) { described_class.dsl_key }

View File

@ -2,7 +2,7 @@
require "cask/dsl/base" require "cask/dsl/base"
shared_examples Cask::DSL::Base do RSpec.shared_examples Cask::DSL::Base do
it "supports the token method" do it "supports the token method" do
expect(dsl.token).to eq(cask.token) expect(dsl.token).to eq(cask.token)
end end

View File

@ -2,7 +2,7 @@
require "cask/staged" require "cask/staged"
shared_examples Cask::Staged do RSpec.shared_examples Cask::Staged do
let(:existing_path) { Pathname("/path/to/file/that/exists") } let(:existing_path) { Pathname("/path/to/file/that/exists") }
let(:non_existent_path) { Pathname("/path/to/file/that/does/not/exist") } let(:non_existent_path) { Pathname("/path/to/file/that/does/not/exist") }

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
shared_examples "parseable arguments" do RSpec.shared_examples "parseable arguments" do
subject(:method_name) { "#{command_name.tr("-", "_")}_args" } subject(:method_name) { "#{command_name.tr("-", "_")}_args" }
let(:command_name) do |example| let(:command_name) do |example|

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
shared_examples "formulae exist" do |array| RSpec.shared_examples "formulae exist" do |array|
array.each do |f| array.each do |f|
it "#{f} formula exists" do it "#{f} formula exists" do
core_tap = Pathname("#{HOMEBREW_LIBRARY_PATH}/../Taps/homebrew/homebrew-core") core_tap = Pathname("#{HOMEBREW_LIBRARY_PATH}/../Taps/homebrew/homebrew-core")

View File

@ -2,13 +2,13 @@
require "unpack_strategy" require "unpack_strategy"
shared_examples "UnpackStrategy::detect" do RSpec.shared_examples "UnpackStrategy::detect" do
it "is correctly detected" do it "is correctly detected" do
expect(UnpackStrategy.detect(path)).to be_a described_class expect(UnpackStrategy.detect(path)).to be_a described_class
end end
end end
shared_examples "#extract" do |children: []| RSpec.shared_examples "#extract" do |children: []|
specify "#extract" do specify "#extract" do
mktmpdir do |unpack_dir| mktmpdir do |unpack_dir|
described_class.new(path).extract(to: unpack_dir) described_class.new(path).extract(to: unpack_dir)