Sha256: 96119ccb27a3f8a5361fae36e344b94321fed5767cd617c46f0e35ad06b711c4
Contents?: true
Size: 597 Bytes
Versions: 5
Compression:
Stored size: 597 Bytes
Contents
require_relative '../spec_helper' require_relative '../../lib/bioinform/support/array_product' describe Array do context '::product' do it 'should take any number of arrays and product them as if #product was made to first and others' do Array.product([1,2,3]).should == [1,2,3].product() Array.product([1,2,3],[4,5,6]).should == [1,2,3].product([4,5,6]) Array.product([1,2,3],[4,5,6],[7,8,9]).should == [1,2,3].product([4,5,6],[7,8,9]) end it 'should return empty array if no arrays\'re given' do Array.product().should == [] end end end
Version data entries
5 entries across 5 versions & 1 rubygems