summaryrefslogtreecommitdiff
path: root/spec/ruby/core/thread/exit_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/thread/exit_spec.rb')
-rw-r--r--spec/ruby/core/thread/exit_spec.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/ruby/core/thread/exit_spec.rb b/spec/ruby/core/thread/exit_spec.rb
new file mode 100644
index 0000000000..dbcd889898
--- /dev/null
+++ b/spec/ruby/core/thread/exit_spec.rb
@@ -0,0 +1,20 @@
+require_relative '../../spec_helper'
+require_relative 'fixtures/classes'
+
+describe "Thread#exit" do
+ it "is an alias of Thread#kill" do
+ Thread.instance_method(:exit).should == Thread.instance_method(:kill)
+ end
+end
+
+describe "Thread#exit!" do
+ it "needs to be reviewed for spec completeness"
+end
+
+describe "Thread.exit" do
+ it "causes the current thread to exit" do
+ thread = Thread.new { Thread.exit; sleep }
+ thread.join
+ thread.status.should == false
+ end
+end