summaryrefslogtreecommitdiff
path: root/spec/ruby/core/conditionvariable
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/conditionvariable')
-rw-r--r--spec/ruby/core/conditionvariable/broadcast_spec.rb3
-rw-r--r--spec/ruby/core/conditionvariable/marshal_dump_spec.rb3
-rw-r--r--spec/ruby/core/conditionvariable/signal_spec.rb3
-rw-r--r--spec/ruby/core/conditionvariable/wait_spec.rb3
4 files changed, 4 insertions, 8 deletions
diff --git a/spec/ruby/core/conditionvariable/broadcast_spec.rb b/spec/ruby/core/conditionvariable/broadcast_spec.rb
index d88159df23..16c7b4cc8d 100644
--- a/spec/ruby/core/conditionvariable/broadcast_spec.rb
+++ b/spec/ruby/core/conditionvariable/broadcast_spec.rb
@@ -1,5 +1,4 @@
require_relative '../../spec_helper'
-require 'thread'
describe "ConditionVariable#broadcast" do
it "releases all threads waiting in line for this resource" do
@@ -25,7 +24,7 @@ describe "ConditionVariable#broadcast" do
# wait until all threads are sleeping (ie waiting)
Thread.pass until threads.all?(&:stop?)
- r2.should be_empty
+ r2.should.empty?
m.synchronize do
cv.broadcast
end
diff --git a/spec/ruby/core/conditionvariable/marshal_dump_spec.rb b/spec/ruby/core/conditionvariable/marshal_dump_spec.rb
index f951a13e28..594c178e88 100644
--- a/spec/ruby/core/conditionvariable/marshal_dump_spec.rb
+++ b/spec/ruby/core/conditionvariable/marshal_dump_spec.rb
@@ -1,9 +1,8 @@
require_relative '../../spec_helper'
-require 'thread'
describe "ConditionVariable#marshal_dump" do
it "raises a TypeError" do
cv = ConditionVariable.new
- -> { cv.marshal_dump }.should raise_error(TypeError, /can't dump/)
+ -> { cv.marshal_dump }.should.raise(TypeError, /can't dump/)
end
end
diff --git a/spec/ruby/core/conditionvariable/signal_spec.rb b/spec/ruby/core/conditionvariable/signal_spec.rb
index 86383073f1..3b266cf8c6 100644
--- a/spec/ruby/core/conditionvariable/signal_spec.rb
+++ b/spec/ruby/core/conditionvariable/signal_spec.rb
@@ -1,5 +1,4 @@
require_relative '../../spec_helper'
-require 'thread'
describe "ConditionVariable#signal" do
it "releases the first thread waiting in line for this resource" do
@@ -25,7 +24,7 @@ describe "ConditionVariable#signal" do
# wait until all threads are sleeping (ie waiting)
Thread.pass until threads.all?(&:stop?)
- r2.should be_empty
+ r2.should.empty?
100.times do |i|
m.synchronize do
cv.signal
diff --git a/spec/ruby/core/conditionvariable/wait_spec.rb b/spec/ruby/core/conditionvariable/wait_spec.rb
index 9a68c2b5a1..1af53a15a2 100644
--- a/spec/ruby/core/conditionvariable/wait_spec.rb
+++ b/spec/ruby/core/conditionvariable/wait_spec.rb
@@ -1,5 +1,4 @@
require_relative '../../spec_helper'
-require 'thread'
describe "ConditionVariable#wait" do
it "calls #sleep on the given object" do
@@ -164,7 +163,7 @@ describe "ConditionVariable#wait" do
# On TruffleRuby, this causes a safepoint which has interesting
# interactions with the ConditionVariable.
bt = t.backtrace
- bt.should be_kind_of(Array)
+ bt.should.is_a?(Array)
bt.size.should >= 2
}
end