Permalink
Browse files

Add a spec for Marshal.load with Rubinius::AtomicReference

  • Loading branch information...
1 parent 1cc7702 commit a2ab97cb6663d4b67b62d559531ee6f9485ea7c6 @ryoqun ryoqun committed Apr 29, 2012
Showing with 14 additions and 0 deletions.
  1. +6 −0 spec/core/marshal/load_spec.rb
  2. +8 −0 spec/core/marshal/shared/load.rb
@@ -0,0 +1,6 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../shared/load', __FILE__)
+
+describe "Marshal.load" do
+ it_behaves_like :marshal_load, :load
+end
@@ -0,0 +1,8 @@
+describe :marshal_load, :shared => true do
+ it "loads an AtomicReference" do
+ data = "\x04\bU:\x1ERubinius::AtomicReferencei\x00"
+ atomic_reference = Marshal.send(@method, data)
+ atomic_reference.class.should == Rubinius::AtomicReference
+ atomic_reference.value.should == 0
+ end
+end

0 comments on commit a2ab97c

Please sign in to comment.