Permalink
Browse files

Add specs for Rubinius::AtomicReference.new

  • Loading branch information...
1 parent 3867bfb commit e70c9447830357afb0483d286171f8b7f7375e03 @ryoqun ryoqun committed Apr 29, 2012
Showing with 12 additions and 0 deletions.
  1. +12 −0 spec/core/atomicreference/new_spec.rb
@@ -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

0 comments on commit e70c944

Please sign in to comment.