Sha256: b074eb4926e98a7be86559e5ad10b3ae675e07c3781dbe2e3383f364c28f326a
Contents?: true
Size: 853 Bytes
Versions: 25
Compression:
Stored size: 853 Bytes
Contents
require File.expand_path(File.join(File.dirname(__FILE__), 'spec_helper')) describe "try_dup" do it "returns a duplicate version on regular objects" do obj = Object.new oth = obj.try_dup obj.should_not === oth end it "returns self on Numerics" do obj = 12 oth = obj.try_dup obj.should === oth end it "returns self on Symbols" do obj = :test oth = obj.try_dup obj.should === oth end it "returns self on true" do obj = true oth = obj.try_dup obj.should === oth end it "returns self on false" do obj = false oth = obj.try_dup obj.should === oth end it "returns self on nil" do obj = nil oth = obj.try_dup obj.should === oth end it "returns self on modules" do obj = Extlib oth = obj.try_dup obj.object_id.should == oth.object_id end end
Version data entries
25 entries across 24 versions & 5 rubygems