Sha256: 8e7961e89c413444773139868077c2804787b619b96f50bf290890ce649a993f
Contents?: true
Size: 505 Bytes
Versions: 6
Compression:
Stored size: 505 Bytes
Contents
require 'spec_helper' describe Picky::Generators::Weights::Logarithmic do let(:logarithmic) { described_class.new } describe 'saved?' do it 'is correct' do logarithmic.saved?.should == true end end describe 'weight_for' do it 'is 0 for 0' do logarithmic.weight_for(0).should == 0 end it 'is 0 for 1' do logarithmic.weight_for(1).should == 0 end it 'is log(x) for x' do logarithmic.weight_for(1234).should == Math.log(1234) end end end
Version data entries
6 entries across 6 versions & 1 rubygems