1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Accommodate process title spec to ruby-core setup

I'm guessing the commands under ruby-core setup are very long, so the
title gets truncated. Use a shorter title, since the test doesn't really
care.
This commit is contained in:
David Rodríguez 2020-06-14 21:03:42 +02:00 committed by Hiroshi SHIBATA
parent 117b504b98
commit 094fb6ae0d
Notes: git 2020-06-15 12:39:04 +09:00

View file

@ -67,17 +67,17 @@ RSpec.describe "bundle exec" do
expect(out).to eq(Gem::VERSION)
end
it "respects custom process title when loading through ruby", :ruby_repo do
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")
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