summaryrefslogtreecommitdiff
path: root/spec/rubyspec/core/process/getpgid_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/rubyspec/core/process/getpgid_spec.rb')
-rw-r--r--spec/rubyspec/core/process/getpgid_spec.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/rubyspec/core/process/getpgid_spec.rb b/spec/rubyspec/core/process/getpgid_spec.rb
new file mode 100644
index 0000000000..b92fb15152
--- /dev/null
+++ b/spec/rubyspec/core/process/getpgid_spec.rb
@@ -0,0 +1,17 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+describe "Process.getpgid" do
+ platform_is_not :windows do
+ it "coerces the argument to an Integer" do
+ Process.getpgid(mock_int(Process.pid)).should == Process.getpgrp
+ end
+
+ it "returns the process group ID for the given process id" do
+ Process.getpgid(Process.pid).should == Process.getpgrp
+ end
+
+ it "returns the process group ID for the calling process id when passed 0" do
+ Process.getpgid(0).should == Process.getpgrp
+ end
+ end
+end