Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add specs for Rubinius::AtomicReference.new

  • Loading branch information...
commit e70c9447830357afb0483d286171f8b7f7375e03 1 parent 3867bfb
Ryo Onodera ryoqun authored
Showing with 12 additions and 0 deletions.
  1. +12 −0 spec/core/atomicreference/new_spec.rb
12 spec/core/atomicreference/new_spec.rb
View
@@ -0,0 +1,12 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+describe "Rubinius::AtomicReference.new" do
+ it "creates an AtomicReference to a specified value" do
+ object = Object.new
+ Rubinius::AtomicReference.new(object).value.should equal(object)
+ end
+
+ it "creates an AtomicReference to nil" do
+ Rubinius::AtomicReference.new(nil).value.should equal(nil)
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.