зеркало из https://github.com/github/ruby.git
Added the condition for ruby_core repository.
This commit is contained in:
Родитель
57ccea6232
Коммит
44f7f093ab
|
@ -223,6 +223,14 @@ RSpec.describe Bundler::SharedHelpers do
|
|||
ENV["BUNDLE_GEMFILE"] = "Gemfile"
|
||||
end
|
||||
|
||||
let(:setup_path) do
|
||||
if ruby_core?
|
||||
File.expand_path("../../../lib/bundler/setup", __dir__)
|
||||
else
|
||||
File.expand_path("../../lib/bundler/setup", __dir__)
|
||||
end
|
||||
end
|
||||
|
||||
shared_examples_for "ENV['PATH'] gets set correctly" do
|
||||
before { Dir.mkdir ".bundle" }
|
||||
|
||||
|
@ -236,7 +244,7 @@ RSpec.describe Bundler::SharedHelpers do
|
|||
shared_examples_for "ENV['RUBYOPT'] gets set correctly" do
|
||||
it "ensures -rbundler/setup is at the beginning of ENV['RUBYOPT']" do
|
||||
subject.set_bundle_environment
|
||||
expect(ENV["RUBYOPT"].split(" ")).to start_with("-r#{File.expand_path("../../lib/bundler/setup", __dir__)}")
|
||||
expect(ENV["RUBYOPT"].split(" ")).to start_with("-r#{setup_path}")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -279,7 +279,12 @@ RSpec.describe "bundle exec" do
|
|||
G
|
||||
|
||||
rubyopt = ENV["RUBYOPT"]
|
||||
rubyopt = "-r#{File.expand_path("../../lib/bundler/setup", __dir__)} #{rubyopt}"
|
||||
setup_path = if ruby_core?
|
||||
File.expand_path("../../../lib/bundler/setup", __dir__)
|
||||
else
|
||||
File.expand_path("../../lib/bundler/setup", __dir__)
|
||||
end
|
||||
rubyopt = "-r#{setup_path} #{rubyopt}"
|
||||
|
||||
bundle "exec 'echo $RUBYOPT'"
|
||||
expect(out).to have_rubyopts(rubyopt)
|
||||
|
|
Загрузка…
Ссылка в новой задаче