mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Don't include FileUtils everywhere
This commit is contained in:
parent
c1a4a806e1
commit
fde7d380f7
@ -1,6 +1,8 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
RSpec.describe "Internal Tap JSON -- Formula" do
|
RSpec.describe "Internal Tap JSON -- Formula" do
|
||||||
|
include FileUtils
|
||||||
|
|
||||||
let(:internal_tap_json) { File.read(TEST_FIXTURE_DIR/"internal_tap_json/homebrew-core.json").chomp }
|
let(:internal_tap_json) { File.read(TEST_FIXTURE_DIR/"internal_tap_json/homebrew-core.json").chomp }
|
||||||
let(:tap_git_head) { "9977471165641744a829d3e494fa563407503297" }
|
let(:tap_git_head) { "9977471165641744a829d3e494fa563407503297" }
|
||||||
|
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
require "cmd/shared_examples/args_parse"
|
require "cmd/shared_examples/args_parse"
|
||||||
|
|
||||||
RSpec.describe "brew deps" do
|
RSpec.describe "brew deps" do
|
||||||
|
include FileUtils
|
||||||
|
|
||||||
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
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
require "cmd/shared_examples/args_parse"
|
require "cmd/shared_examples/args_parse"
|
||||||
|
|
||||||
RSpec.describe "brew uses" do
|
RSpec.describe "brew uses" do
|
||||||
|
include FileUtils
|
||||||
|
|
||||||
it_behaves_like "parseable arguments"
|
it_behaves_like "parseable arguments"
|
||||||
|
|
||||||
it "prints the Formulae a given Formula is used by", :integration_test do
|
it "prints the Formulae a given Formula is used by", :integration_test do
|
||||||
|
@ -6,6 +6,8 @@ require "tap"
|
|||||||
require "cmd/shared_examples/args_parse"
|
require "cmd/shared_examples/args_parse"
|
||||||
|
|
||||||
RSpec.describe Homebrew::DevCmd::PrPull do
|
RSpec.describe Homebrew::DevCmd::PrPull do
|
||||||
|
include FileUtils
|
||||||
|
|
||||||
let(:pr_pull) { described_class.new(["foo"]) }
|
let(:pr_pull) { described_class.new(["foo"]) }
|
||||||
let(:formula_rebuild) do
|
let(:formula_rebuild) do
|
||||||
<<~EOS
|
<<~EOS
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
require "formula_auditor"
|
require "formula_auditor"
|
||||||
|
|
||||||
RSpec.describe Homebrew::FormulaAuditor do
|
RSpec.describe Homebrew::FormulaAuditor do
|
||||||
|
include FileUtils
|
||||||
|
|
||||||
let(:dir) { mktmpdir }
|
let(:dir) { mktmpdir }
|
||||||
let(:foo_version) do
|
let(:foo_version) do
|
||||||
@count ||= 0
|
@count ||= 0
|
||||||
|
@ -4,6 +4,8 @@ require "keg"
|
|||||||
require "stringio"
|
require "stringio"
|
||||||
|
|
||||||
RSpec.describe Keg do
|
RSpec.describe Keg do
|
||||||
|
include FileUtils
|
||||||
|
|
||||||
def setup_test_keg(name, version)
|
def setup_test_keg(name, version)
|
||||||
path = HOMEBREW_CELLAR/name/version
|
path = HOMEBREW_CELLAR/name/version
|
||||||
(path/"bin").mkpath
|
(path/"bin").mkpath
|
||||||
|
@ -128,8 +128,6 @@ RSpec.configure do |config|
|
|||||||
# Never truncate output objects.
|
# Never truncate output objects.
|
||||||
RSpec::Support::ObjectFormatter.default_instance.max_formatted_output_length = nil
|
RSpec::Support::ObjectFormatter.default_instance.max_formatted_output_length = nil
|
||||||
|
|
||||||
config.include(FileUtils)
|
|
||||||
|
|
||||||
config.include(RuboCop::RSpec::ExpectOffense)
|
config.include(RuboCop::RSpec::ExpectOffense)
|
||||||
|
|
||||||
config.include(Test::Helper::Cask)
|
config.include(Test::Helper::Cask)
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
RSpec.describe Tap do
|
RSpec.describe Tap do
|
||||||
|
include FileUtils
|
||||||
|
|
||||||
alias_matcher :have_formula_file, :be_formula_file
|
alias_matcher :have_formula_file, :be_formula_file
|
||||||
alias_matcher :have_custom_remote, :be_custom_remote
|
alias_matcher :have_custom_remote, :be_custom_remote
|
||||||
|
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
require "utils/gzip"
|
require "utils/gzip"
|
||||||
|
|
||||||
RSpec.describe Utils::Gzip do
|
RSpec.describe Utils::Gzip do
|
||||||
|
include FileUtils
|
||||||
|
|
||||||
describe "compress_with_options" do
|
describe "compress_with_options" do
|
||||||
it "uses the explicitly specified mtime, orig_name, and output path when passed" do
|
it "uses the explicitly specified mtime, orig_name, and output path when passed" do
|
||||||
mktmpdir do |path|
|
mktmpdir do |path|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user