From f7414bcb17fe1bd67246021251b5f0527bd6afd1 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Thu, 21 Dec 2017 13:05:59 +0900 Subject: Added workarounds for Travis specific issues. --- spec/runtime/gem_tasks_spec.rb | 2 +- spec/runtime/with_clean_env_spec.rb | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'spec/runtime') diff --git a/spec/runtime/gem_tasks_spec.rb b/spec/runtime/gem_tasks_spec.rb index 7bfd0e44a4..5fc87a6d46 100644 --- a/spec/runtime/gem_tasks_spec.rb +++ b/spec/runtime/gem_tasks_spec.rb @@ -37,7 +37,7 @@ RSpec.describe "require 'bundler/gem_tasks'" do it "adds 'pkg' to rake/clean's CLOBBER" do with_gem_path_as(Spec::Path.base_system_gems.to_s) do - sys_exec! %('#{Gem.ruby}' -rrake -e 'load "Rakefile"; puts CLOBBER.inspect') + sys_exec! %('#{Gem.ruby}' -S rake -e 'load "Rakefile"; puts CLOBBER.inspect') end expect(last_command.stdout).to eq '["pkg"]' end diff --git a/spec/runtime/with_clean_env_spec.rb b/spec/runtime/with_clean_env_spec.rb index 225e794eba..fd621071ad 100644 --- a/spec/runtime/with_clean_env_spec.rb +++ b/spec/runtime/with_clean_env_spec.rb @@ -56,11 +56,9 @@ RSpec.describe "Bundler.with_env helpers" do end it "removes variables that bundler added" do - system_gems :bundler - system_gems :bundler, :path => :bundle_path # to ensure the bundler under test is the one activated... - original = ruby!('puts ENV.to_a.map {|e| e.join("=") }.sort.join("\n")') + original = ruby!('puts ENV.to_a.map {|e| e.join("=") }.sort.join("\n")', :env => { :RUBYOPT => "-r#{spec_dir.join("support/hax")}" }) code = 'puts Bundler.original_env.to_a.map {|e| e.join("=") }.sort.join("\n")' - bundle! "exec '#{Gem.ruby}' -e #{code.dump}", :system_bundler => true + bundle! "exec '#{Gem.ruby}' -e #{code.dump}", :env => { :RUBYOPT => "-r#{spec_dir.join("support/hax")}" } expect(out).to eq original end end -- cgit v1.2.1