summaryrefslogtreecommitdiff
path: root/spec/commands/exec_spec.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-04-24 12:26:12 +0200
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-04-26 20:07:19 +0200
commita7d54670f2be0ae31569028d759739f44fd23c8a (patch)
tree3fbd8b1c7386969f313b94837a2a92e5bfc12c2f /spec/commands/exec_spec.rb
parent6f94959d3cc95bea616c40af7ed516b67dcbd5e0 (diff)
downloadbundler-fix_exec_proc_title.tar.gz
Get `bundle exec` respecting proc titlesfix_exec_proc_title
Diffstat (limited to 'spec/commands/exec_spec.rb')
-rw-r--r--spec/commands/exec_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/commands/exec_spec.rb b/spec/commands/exec_spec.rb
index 24aa5f46fe..39e27e94f2 100644
--- a/spec/commands/exec_spec.rb
+++ b/spec/commands/exec_spec.rb
@@ -55,6 +55,17 @@ RSpec.describe "bundle exec" do
expect(out).to eq("hi")
end
+ it "respects custom process title when loading through ruby" do
+ 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-16")
+ puts `ps -eo args | grep [1]-2-3-4-5-6-7-8-9-10-11-12-13-14-15-16`
+ 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-16")
+ end
+
it "accepts --verbose" do
install_gemfile 'gem "rack"'
bundle "exec --verbose echo foobar"