Sha256: 13a5a6ced174a7853b64618d78b3634880547951345dcc9960a465361cae6847
Contents?: true
Size: 359 Bytes
Versions: 1
Compression:
Stored size: 359 Bytes
Contents
require 'spec_helper' describe 'Enumerable#sproduct' do it 'multiply the numbers of an enum' do expect((1..4).sproduct).to eq(24) end it 'returns nil when invoked on an empty collection' do expect([].sproduct).to be_nil end it 'returns default value when invoked on an empty collection' do expect([].sproduct(0)).to be_zero end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
powerpack-0.0.6 | spec/powerpack/enumerable/sproduct_spec.rb |