From cdb07d89ae54468d66a3f6948c937b00a3bbcdf0 Mon Sep 17 00:00:00 2001 From: Seeker Date: Mon, 21 Dec 2020 16:17:39 -0800 Subject: [PATCH] integration_test: fix indentation for test formulae --- Library/Homebrew/global.rb | 1 + .../test/support/helper/spec/shared_context/integration_test.rb | 2 +- Library/Homebrew/test/utils/bottles/bottles_spec.rb | 2 -- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/global.rb b/Library/Homebrew/global.rb index 949d8c8caf..78a8db4790 100644 --- a/Library/Homebrew/global.rb +++ b/Library/Homebrew/global.rb @@ -29,6 +29,7 @@ require "active_support/core_ext/hash/deep_merge" require "active_support/core_ext/file/atomic" require "active_support/core_ext/enumerable" require "active_support/core_ext/string/exclude" +require "active_support/core_ext/string/indent" I18n.backend.available_locales # Initialize locales so they can be overwritten. I18n.backend.store_translations :en, support: { array: { last_word_connector: " and " } } diff --git a/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb b/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb index 6a771d1b1c..be2fa0a364 100644 --- a/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb +++ b/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb @@ -171,7 +171,7 @@ RSpec.shared_context "integration test" do Formulary.core_path(name).tap do |formula_path| formula_path.write <<~RUBY class #{Formulary.class_s(name)} < Formula - #{content} + #{content.indent(2)} end RUBY end diff --git a/Library/Homebrew/test/utils/bottles/bottles_spec.rb b/Library/Homebrew/test/utils/bottles/bottles_spec.rb index 0731b5a4b7..601b1b4125 100644 --- a/Library/Homebrew/test/utils/bottles/bottles_spec.rb +++ b/Library/Homebrew/test/utils/bottles/bottles_spec.rb @@ -17,8 +17,6 @@ describe Utils::Bottles do describe "#add_bottle_stanza!" do let(:bottle_output) do - require "active_support/core_ext/string/indent" - <<~RUBY.chomp.indent(2) bottle do sha256 "f7b1fc772c79c20fddf621ccc791090bc1085fcef4da6cca03399424c66e06ca" => :sierra