Sha256: 78c8c99c30c1ab7ab6899c896ea512823b8583133eec42262d2d8f45fd13bc81

Contents?: true

Size: 620 Bytes

Versions: 2

Compression:

Stored size: 620 Bytes

Contents

require 'spec_helper'

describe Generators::WeightsGenerator do

  context 'integration' do
    it 'should generate the correct values' do
      generator = described_class.new :a => Array.new(0),
                                      :b => Array.new(1),
                                      :c => Array.new(10),
                                      :d => Array.new(100),
                                      :e => Array.new(1000)

      result = generator.generate

      result[:c].should be_close 2.3, 0.011
      result[:d].should be_close 4.6, 0.011
      result[:e].should be_close 6.9, 0.011
    end
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
picky-2.7.0 spec/lib/generators/weights_generator_spec.rb
picky-2.6.0 spec/lib/generators/weights_generator_spec.rb