summaryrefslogtreecommitdiff
path: root/spec/ruby/core/thread/element_set_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/thread/element_set_spec.rb')
-rw-r--r--spec/ruby/core/thread/element_set_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/ruby/core/thread/element_set_spec.rb b/spec/ruby/core/thread/element_set_spec.rb
index f205177304..97d6c23980 100644
--- a/spec/ruby/core/thread/element_set_spec.rb
+++ b/spec/ruby/core/thread/element_set_spec.rb
@@ -12,7 +12,7 @@ describe "Thread#[]=" do
th.freeze
-> {
th[:foo] = "bar"
- }.should raise_error(FrozenError, "can't modify frozen thread locals")
+ }.should.raise(FrozenError, "can't modify frozen thread locals")
end.join
end
@@ -40,8 +40,8 @@ describe "Thread#[]=" do
end
it "raises exceptions on the wrong type of keys" do
- -> { Thread.current[nil] = true }.should raise_error(TypeError)
- -> { Thread.current[5] = true }.should raise_error(TypeError)
+ -> { Thread.current[nil] = true }.should.raise(TypeError)
+ -> { Thread.current[5] = true }.should.raise(TypeError)
end
it "is not shared across fibers" do
@@ -51,7 +51,7 @@ describe "Thread#[]=" do
Thread.current[:value].should == 1
end
fib.resume
- Thread.current[:value].should be_nil
+ Thread.current[:value].should == nil
Thread.current[:value] = 2
fib.resume
Thread.current[:value] = 2