Sha256: fa5ffa4fa7c8a38922338563deb06aed3229f6661b7d5a9b10568d5cb8096d7f
Contents?: true
Size: 438 Bytes
Versions: 7
Compression:
Stored size: 438 Bytes
Contents
require 'spec_helper' describe Array do it 'should compact blank objects and leave non-blank objects in place' do [0, 1, 2, 3].compakt.should == [0, 1, 2, 3] [0, '', :symbol].compakt.should == [0, :symbol] [[], [1, 2]].compakt.should == [[1, 2]] [{ :stuff => :junk }, {}, 'stuff'].compakt.should == [{ :stuff => :junk }, 'stuff'] [' ', ' I need trimming! '].compakt.should == [' I need trimming! '] end end
Version data entries
7 entries across 7 versions & 1 rubygems