Sha256: ae63cabbb9b99dc2fb46f5c5a39a28eee7931bd79ae2b4fa6e992f29a15f457c

Contents?: true

Size: 661 Bytes

Versions: 53

Compression:

Stored size: 661 Bytes

Contents

require 'spec_helper'

describe Cacher::WeightsGenerator do

  context 'integration' do
    it 'should generate the correct values' do
      generator = Cacher::WeightsGenerator.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

53 entries across 53 versions & 1 rubygems

Version Path
picky-0.2.3 spec/lib/cacher/weights_generator_spec.rb
picky-0.2.2 spec/lib/cacher/weights_generator_spec.rb
picky-0.2.1 spec/lib/cacher/weights_generator_spec.rb
picky-0.2.0 spec/lib/cacher/weights_generator_spec.rb
picky-0.1.0 spec/lib/cacher/weights_generator_spec.rb
picky-0.0.9 spec/lib/cacher/weights_generator_spec.rb
picky-0.0.8 spec/lib/cacher/weights_generator_spec.rb
picky-0.0.7 spec/lib/cacher/weights_generator_spec.rb
picky-0.0.6 spec/lib/cacher/weights_generator_spec.rb
picky-0.0.5 spec/lib/cacher/weights_generator_spec.rb
picky-0.0.4 spec/lib/cacher/weights_generator_spec.rb
picky-0.0.3 spec/lib/cacher/weights_generator_spec.rb
picky-0.0.2 spec/lib/cacher/weights_generator_spec.rb