Skip to content
Browse files

Add spec for Kernel#initialize_dup

  • Loading branch information...
1 parent 2acbc7d commit 50cd87bc335e912bfce221301a84a3ac017ae314 @carlosgaldino committed Sep 16, 2012
Showing with 11 additions and 1 deletion.
  1. +11 −1 spec/ruby/core/kernel/initialize_dup_spec.rb
View
12 spec/ruby/core/kernel/initialize_dup_spec.rb
@@ -1,7 +1,17 @@
require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
ruby_version_is "1.9" do
describe "Kernel#initialize_dup" do
- it "needs to be reviewed for spec completeness"
+ it "calls #initialize_copy" do
+ ScratchPad.clear
+
+ obj = KernelSpecs::Duplicate.new(1, :a)
+ other = KernelSpecs::Duplicate.new(2, :b)
+
+ obj.initialize_dup(other)
+
+ ScratchPad.recorded.should == obj.object_id
+ end
end
end

0 comments on commit 50cd87b

Please sign in to comment.
Something went wrong with that request. Please try again.