Skip to content

Unskip some bundler specs #3225

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions spec/bundler/commands/exec_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
system_gems(system_gems_to_install, :path => default_bundle_path)
end

it "works with --gemfile flag", :ruby_repo do
it "works with --gemfile flag" do
create_file "CustomGemfile", <<-G
gem "rack", "1.0.0"
G
Expand All @@ -15,7 +15,7 @@
expect(out).to eq("1.0.0")
end

it "activates the correct gem", :ruby_repo do
it "activates the correct gem" do
gemfile <<-G
gem "rack", "0.9.1"
G
Expand All @@ -24,7 +24,7 @@
expect(out).to eq("0.9.1")
end

it "works when the bins are in ~/.bundle", :ruby_repo do
it "works when the bins are in ~/.bundle" do
install_gemfile <<-G
gem "rack"
G
Expand All @@ -33,7 +33,7 @@
expect(out).to eq("1.0.0")
end

it "works when running from a random directory", :ruby_repo do
it "works when running from a random directory" do
install_gemfile <<-G
gem "rack"
G
Expand Down Expand Up @@ -71,13 +71,13 @@
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")
Process.setproctitle("1-2-3-4-5-6-7")
puts `ps -ocommand= -p#{$$}`
RUBY
create_file "Gemfile"
create_file "a.rb", script_that_changes_its_own_title_and_checks_if_picked_up_by_ps_unix_utility
bundle "exec ruby a.rb"
expect(out).to eq("1-2-3-4-5-6-7-8-9-10-11-12-13-14-15")
expect(out).to eq("1-2-3-4-5-6-7")
end

it "accepts --verbose" do
Expand Down Expand Up @@ -269,7 +269,7 @@
)
end

it "handles gems installed with --without", :ruby_repo do
it "handles gems installed with --without" do
bundle "config --local without middleware"
install_gemfile <<-G
source "#{file_uri_for(gem_repo1)}"
Expand Down Expand Up @@ -354,7 +354,7 @@
expect(err).to include("bundler: exec needs a command to run")
end

it "raises a helpful error when exec'ing to something outside of the bundle", :ruby_repo do
it "raises a helpful error when exec'ing to something outside of the bundle" do
bundle! "config set clean false" # want to keep the rackup binstub
install_gemfile! <<-G
source "#{file_uri_for(gem_repo1)}"
Expand Down Expand Up @@ -458,7 +458,7 @@
end

describe "with gem executables" do
describe "run from a random directory", :ruby_repo do
describe "run from a random directory" do
before(:each) do
install_gemfile <<-G
gem "rack"
Expand Down Expand Up @@ -588,7 +588,7 @@
end

describe "with gems bundled for deployment" do
it "works when calling bundler from another script", :ruby_repo do
it "works when calling bundler from another script" do
skip "https://github.com/rubygems/bundler/issues/6898" if Gem.win_platform?

gemfile <<-G
Expand Down Expand Up @@ -874,7 +874,7 @@ def bin_path(a,b,c)
bundle! :install
end

it "correctly shells out", :ruby_repo do
it "correctly shells out" do
skip "https://github.com/rubygems/bundler/issues/6898" if Gem.win_platform?

file = bundled_app("file_that_bundle_execs.rb")
Expand Down
2 changes: 1 addition & 1 deletion spec/bundler/install/deploy_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
bundle! :install
end

it "works when you bundle exec bundle", :ruby_repo do
it "works when you bundle exec bundle" do
skip "doesn't find bundle" if Gem.win_platform?

bundle! :install
Expand Down
8 changes: 4 additions & 4 deletions spec/bundler/other/platform_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ def should_be_patchlevel_fixnum
system_gems "rack-1.0.0", "rack-0.9.1", :path => default_bundle_path
end

it "activates the correct gem when ruby version matches", :ruby_repo do
it "activates the correct gem when ruby version matches" do
gemfile <<-G
gem "rack", "0.9.1"

Expand All @@ -852,7 +852,7 @@ def should_be_patchlevel_fixnum
expect(out).to include("0.9.1")
end

it "fails when the ruby version doesn't match", :ruby_repo do
it "fails when the ruby version doesn't match" do
gemfile <<-G
gem "rack", "0.9.1"

Expand All @@ -863,7 +863,7 @@ def should_be_patchlevel_fixnum
should_be_ruby_version_incorrect
end

it "fails when the engine doesn't match", :ruby_repo do
it "fails when the engine doesn't match" do
gemfile <<-G
gem "rack", "0.9.1"

Expand All @@ -885,7 +885,7 @@ def should_be_patchlevel_fixnum
# should_be_engine_version_incorrect
# end

it "fails when patchlevel doesn't match", :ruby_repo do
it "fails when patchlevel doesn't match" do
gemfile <<-G
source "#{file_uri_for(gem_repo1)}"
gem "rack"
Expand Down
3 changes: 3 additions & 0 deletions spec/bundler/support/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@ def gembin(cmd, options = {})
end

def gem_command(command, options = {})
env = options[:env] || {}
env["RUBYOPT"] = opt_add("-r#{spec_dir}/support/hax.rb", env["RUBYOPT"] || ENV["RUBYOPT"])
options[:env] = env
sys_exec("#{Path.gem_bin} #{command}", options)
end
bang :gem_command
Expand Down