Sha256: 3e46ca7578e34425e786828036fe1b128809a5bde062cb6c25151de03962319d
Contents?: true
Size: 476 Bytes
Versions: 14
Compression:
Stored size: 476 Bytes
Contents
describe 'array' do describe "wrap" do it "should return empty array for nil" do Array.wrap(nil).should == [] end it "should return unchanged array for array" do Array.wrap([1, 2, 3]).should == [1, 2, 3] end it "should not flatten multidimensional array" do Array.wrap([[1], [2], [3]]).should == [[1], [2], [3]] end it "should turn simple object into array" do Array.wrap(0).should == [0] end end end
Version data entries
14 entries across 14 versions & 2 rubygems