aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/test')
-rw-r--r--Library/Homebrew/test/Gemfile12
-rw-r--r--Library/Homebrew/test/Gemfile.lock65
-rw-r--r--Library/Homebrew/test/cask/cask_spec.rb6
-rw-r--r--Library/Homebrew/test/cask/cli/style_spec.rb4
-rw-r--r--Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb10
-rw-r--r--Library/Homebrew/test/support/lib/config.rb2
6 files changed, 10 insertions, 89 deletions
diff --git a/Library/Homebrew/test/Gemfile b/Library/Homebrew/test/Gemfile
deleted file mode 100644
index f3c16c710..000000000
--- a/Library/Homebrew/test/Gemfile
+++ /dev/null
@@ -1,12 +0,0 @@
-source "https://rubygems.org"
-
-gem "parallel_tests"
-gem "rspec"
-gem "rubocop"
-gem "rspec-its", require: false
-gem "rspec-wait", require: false
-
-group :coverage do
- gem "simplecov", require: false
- gem "codecov", require: false
-end
diff --git a/Library/Homebrew/test/Gemfile.lock b/Library/Homebrew/test/Gemfile.lock
deleted file mode 100644
index 4d4eefd7d..000000000
--- a/Library/Homebrew/test/Gemfile.lock
+++ /dev/null
@@ -1,65 +0,0 @@
-GEM
- remote: https://rubygems.org/
- specs:
- ast (2.3.0)
- codecov (0.1.9)
- json
- simplecov
- url
- diff-lcs (1.3)
- docile (1.1.5)
- json (2.0.3)
- parallel (1.10.0)
- parallel_tests (2.13.0)
- parallel
- parser (2.4.0.0)
- ast (~> 2.2)
- powerpack (0.1.1)
- rainbow (2.2.1)
- rspec (3.5.0)
- rspec-core (~> 3.5.0)
- rspec-expectations (~> 3.5.0)
- rspec-mocks (~> 3.5.0)
- rspec-core (3.5.4)
- rspec-support (~> 3.5.0)
- rspec-expectations (3.5.0)
- diff-lcs (>= 1.2.0, < 2.0)
- rspec-support (~> 3.5.0)
- rspec-its (1.2.0)
- rspec-core (>= 3.0.0)
- rspec-expectations (>= 3.0.0)
- rspec-mocks (3.5.0)
- diff-lcs (>= 1.2.0, < 2.0)
- rspec-support (~> 3.5.0)
- rspec-support (3.5.0)
- rspec-wait (0.0.9)
- rspec (>= 3, < 4)
- rubocop (0.47.1)
- parser (>= 2.3.3.1, < 3.0)
- powerpack (~> 0.1)
- rainbow (>= 1.99.1, < 3.0)
- ruby-progressbar (~> 1.7)
- unicode-display_width (~> 1.0, >= 1.0.1)
- ruby-progressbar (1.8.1)
- simplecov (0.13.0)
- docile (~> 1.1.0)
- json (>= 1.8, < 3)
- simplecov-html (~> 0.10.0)
- simplecov-html (0.10.0)
- unicode-display_width (1.1.3)
- url (0.3.2)
-
-PLATFORMS
- ruby
-
-DEPENDENCIES
- codecov
- parallel_tests
- rspec
- rspec-its
- rspec-wait
- rubocop
- simplecov
-
-BUNDLED WITH
- 1.14.5
diff --git a/Library/Homebrew/test/cask/cask_spec.rb b/Library/Homebrew/test/cask/cask_spec.rb
index 3736f3c01..a8c4ecf5f 100644
--- a/Library/Homebrew/test/cask/cask_spec.rb
+++ b/Library/Homebrew/test/cask/cask_spec.rb
@@ -24,7 +24,7 @@ describe Hbc::Cask, :cask do
describe "load" do
let(:tap_path) { Hbc.default_tap.path }
let(:file_dirname) { Pathname.new(__FILE__).dirname }
- let(:relative_tap_path) { tap_path.relative_path_from(file_dirname) }
+ let(:relative_tap_path) { tap_path.realpath.relative_path_from(file_dirname) }
it "returns an instance of the Cask for the given token" do
c = Hbc::CaskLoader.load("local-caffeine")
@@ -56,7 +56,9 @@ describe Hbc::Cask, :cask do
end
it "returns an instance of the Cask from a relative file location" do
- c = Hbc::CaskLoader.load(relative_tap_path/"Casks/local-caffeine.rb")
+ c = file_dirname.cd do
+ Hbc::CaskLoader.load(relative_tap_path/"Casks/local-caffeine.rb")
+ end
expect(c).to be_kind_of(Hbc::Cask)
expect(c.token).to eq("local-caffeine")
end
diff --git a/Library/Homebrew/test/cask/cli/style_spec.rb b/Library/Homebrew/test/cask/cli/style_spec.rb
index d41636beb..d021d8000 100644
--- a/Library/Homebrew/test/cask/cli/style_spec.rb
+++ b/Library/Homebrew/test/cask/cli/style_spec.rb
@@ -62,7 +62,7 @@ describe Hbc::CLI::Style, :cask do
context "when installation succeeds" do
before do
- allow(Homebrew).to receive(:install_gem_setup_path!)
+ allow(Homebrew).to receive(:run_bundler_if_needed!)
end
it "exits successfully" do
@@ -72,7 +72,7 @@ describe Hbc::CLI::Style, :cask do
context "when installation fails" do
before do
- allow(Homebrew).to receive(:install_gem_setup_path!).and_raise(SystemExit)
+ allow(Homebrew).to receive(:run_bundler_if_needed!).and_raise(SystemExit)
end
it "raises an error" do
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 ae1854f58..3a36f1853 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
@@ -89,12 +89,10 @@ RSpec.shared_context "integration test" do
ruby_args << "-rtest/support/helper/integration_mocks"
ruby_args << (HOMEBREW_LIBRARY_PATH/"brew.rb").resolved_path.to_s
- Bundler.with_original_env do
- stdout, stderr, status = Open3.capture3(env, RUBY_PATH, *ruby_args, *args)
- $stdout.print stdout
- $stderr.print stderr
- status
- end
+ stdout, stderr, status = Open3.capture3(env, RUBY_PATH, *ruby_args, *args)
+ $stdout.print stdout
+ $stderr.print stderr
+ status
end
def setup_test_formula(name, content = nil)
diff --git a/Library/Homebrew/test/support/lib/config.rb b/Library/Homebrew/test/support/lib/config.rb
index 3a0a76722..fb5c210fe 100644
--- a/Library/Homebrew/test/support/lib/config.rb
+++ b/Library/Homebrew/test/support/lib/config.rb
@@ -2,8 +2,6 @@ unless ENV["HOMEBREW_BREW_FILE"]
raise "HOMEBREW_BREW_FILE was not exported! Please call bin/brew directly!"
end
-require "constants"
-
require "tmpdir"
require "pathname"