summaryrefslogtreecommitdiff
path: root/spec/commands/exec_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/commands/exec_spec.rb')
-rw-r--r--spec/commands/exec_spec.rb59
1 files changed, 38 insertions, 21 deletions
diff --git a/spec/commands/exec_spec.rb b/spec/commands/exec_spec.rb
index 42f760ab12..17fc959baf 100644
--- a/spec/commands/exec_spec.rb
+++ b/spec/commands/exec_spec.rb
@@ -68,6 +68,8 @@ RSpec.describe "bundle exec" do
end
it "respects custom process title when loading through ruby" do
+ skip "https://github.com/rubygems/bundler/issues/6898" if Gem.win_platform?
+
script_that_changes_its_own_title_and_checks_if_picked_up_by_ps_unix_utility = <<~'RUBY'
Process.setproctitle("1-2-3-4-5-6-7-8-9-10-11-12-13-14-15")
puts `ps -ocommand= -p#{$$}`
@@ -91,6 +93,8 @@ RSpec.describe "bundle exec" do
end
it "handles --keep-file-descriptors" do
+ skip "https://github.com/rubygems/bundler/issues/6898" if Gem.win_platform?
+
require "tempfile"
command = Tempfile.new("io-test")
@@ -122,12 +126,14 @@ RSpec.describe "bundle exec" do
end
it "can run a command named --verbose" do
+ skip "https://github.com/rubygems/bundler/issues/6898" if Gem.win_platform?
+
install_gemfile 'gem "rack"'
- File.open("--verbose", "w") do |f|
+ File.open(bundled_app("--verbose"), "w") do |f|
f.puts "#!/bin/sh"
f.puts "echo foobar"
end
- File.chmod(0o744, "--verbose")
+ File.chmod(0o744, bundled_app("--verbose"))
with_path_as(".") do
bundle "exec -- --verbose"
end
@@ -146,21 +152,17 @@ RSpec.describe "bundle exec" do
gem "rack", "0.9.1"
G
- Dir.chdir bundled_app2 do
- install_gemfile bundled_app2("Gemfile"), <<-G
- source "#{file_uri_for(gem_repo2)}"
- gem "rack_two", "1.0.0"
- G
- end
+ install_gemfile bundled_app2("Gemfile"), <<-G, :dir => bundled_app2
+ source "#{file_uri_for(gem_repo2)}"
+ gem "rack_two", "1.0.0"
+ G
bundle! "exec rackup"
expect(out).to eq("0.9.1")
- Dir.chdir bundled_app2 do
- bundle! "exec rackup"
- expect(out).to eq("1.0.0")
- end
+ bundle! "exec rackup", :dir => bundled_app2
+ expect(out).to eq("1.0.0")
end
context "with default gems" do
@@ -254,12 +256,10 @@ RSpec.describe "bundle exec" do
gem "rack", "0.9.1"
G
- Dir.chdir bundled_app2 do
- install_gemfile bundled_app2("Gemfile"), <<-G
- source "#{file_uri_for(gem_repo2)}"
- gem "rack_two", "1.0.0"
- G
- end
+ install_gemfile bundled_app2("Gemfile"), <<-G, :dir => bundled_app2
+ source "#{file_uri_for(gem_repo2)}"
+ gem "rack_two", "1.0.0"
+ G
bundle! "exec rackup"
@@ -286,6 +286,8 @@ RSpec.describe "bundle exec" do
end
it "does not duplicate already exec'ed RUBYOPT" do
+ skip "https://github.com/rubygems/bundler/issues/6898" if Gem.win_platform?
+
install_gemfile <<-G
gem "rack"
G
@@ -301,6 +303,8 @@ RSpec.describe "bundle exec" do
end
it "does not duplicate already exec'ed RUBYLIB" do
+ skip "https://github.com/rubygems/bundler/issues/6898" if Gem.win_platform?
+
install_gemfile <<-G
gem "rack"
G
@@ -368,6 +372,8 @@ RSpec.describe "bundle exec" do
each_prefix.call("exec") do |exec|
describe "when #{exec} is used" do
before(:each) do
+ skip "https://github.com/rubygems/bundler/issues/6898" if Gem.win_platform?
+
install_gemfile <<-G
gem "rack"
G
@@ -581,6 +587,8 @@ RSpec.describe "bundle exec" do
describe "with gems bundled for deployment" do
it "works when calling bundler from another script" do
+ skip "https://github.com/rubygems/bundler/issues/6898" if Gem.win_platform?
+
gemfile <<-G
module Monkey
def bin_path(a,b,c)
@@ -610,8 +618,8 @@ RSpec.describe "bundle exec" do
RUBY
before do
- path.open("w") {|f| f << executable }
- path.chmod(0o755)
+ bundled_app(path).open("w") {|f| f << executable }
+ bundled_app(path).chmod(0o755)
install_gemfile <<-G
gem "rack"
@@ -634,6 +642,8 @@ RSpec.describe "bundle exec" do
shared_examples_for "it runs" do
it "like a normally executed executable" do
+ skip "https://github.com/rubygems/bundler/issues/6898" if Gem.win_platform?
+
subject
expect(exitstatus).to eq(exit_code) if exitstatus
expect(err).to eq(expected_err)
@@ -782,7 +792,7 @@ __FILE__: #{path.to_s.inspect}
end
context "when the path is relative with a leading ./" do
- let(:path) { Pathname.new("./#{super().relative_path_from(Pathname.pwd)}") }
+ let(:path) { Pathname.new("./#{super().relative_path_from(bundled_app)}") }
pending "relative paths with ./ have absolute __FILE__"
end
@@ -813,6 +823,8 @@ __FILE__: #{path.to_s.inspect}
RUBY
it "receives the signal" do
+ skip "https://github.com/rubygems/bundler/issues/6898" if Gem.win_platform?
+
bundle!("exec #{path}") do |_, o, thr|
o.gets # Consumes 'Started' and ensures that thread has started
Process.kill("INT", thr.pid)
@@ -834,6 +846,8 @@ __FILE__: #{path.to_s.inspect}
RUBY
it "makes sure no unexpected signals are restored to DEFAULT" do
+ skip "https://github.com/rubygems/bundler/issues/6898" if Gem.win_platform?
+
test_signals.each do |n|
Signal.trap(n, "IGNORE")
end
@@ -858,6 +872,8 @@ __FILE__: #{path.to_s.inspect}
end
it "correctly shells out", :ruby_repo do
+ skip "https://github.com/rubygems/bundler/issues/6898" if Gem.win_platform?
+
file = bundled_app("file_that_bundle_execs.rb")
create_file(file, <<-RB)
#!#{Gem.ruby}
@@ -874,6 +890,7 @@ __FILE__: #{path.to_s.inspect}
let(:expected) { ruby "gem 'openssl', '< 999999'; require 'openssl'; puts OpenSSL::VERSION", :artifice => nil }
it "only leaves the default gem in the stdlib available" do
+ skip "https://github.com/rubygems/bundler/issues/6898" if Gem.win_platform?
skip "openssl isn't a default gem" if expected.empty?
install_gemfile! "" # must happen before installing the broken system gem