summaryrefslogtreecommitdiff
path: root/spec/ruby/library/monitor/exit_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/monitor/exit_spec.rb')
-rw-r--r--spec/ruby/library/monitor/exit_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/ruby/library/monitor/exit_spec.rb b/spec/ruby/library/monitor/exit_spec.rb
new file mode 100644
index 0000000000..952ad9525d
--- /dev/null
+++ b/spec/ruby/library/monitor/exit_spec.rb
@@ -0,0 +1,10 @@
+require_relative '../../spec_helper'
+require 'monitor'
+
+describe "Monitor#exit" do
+ it "raises ThreadError when monitor is not entered" do
+ m = Monitor.new
+
+ -> { m.exit }.should raise_error(ThreadError)
+ end
+end