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-1.4.1 spec/lib/cacher/weights_generator_spec.rb
picky-1.4.0 spec/lib/cacher/weights_generator_spec.rb
picky-1.3.4 spec/lib/cacher/weights_generator_spec.rb
picky-1.3.3 spec/lib/cacher/weights_generator_spec.rb
picky-1.3.2 spec/lib/cacher/weights_generator_spec.rb
picky-1.3.1 spec/lib/cacher/weights_generator_spec.rb
picky-1.3.0 spec/lib/cacher/weights_generator_spec.rb
picky-1.2.4 spec/lib/cacher/weights_generator_spec.rb
picky-1.2.3 spec/lib/cacher/weights_generator_spec.rb
picky-1.2.2 spec/lib/cacher/weights_generator_spec.rb
picky-1.2.1 spec/lib/cacher/weights_generator_spec.rb
picky-1.2.0 spec/lib/cacher/weights_generator_spec.rb
picky-1.1.7 spec/lib/cacher/weights_generator_spec.rb
picky-1.1.6 spec/lib/cacher/weights_generator_spec.rb
picky-1.1.5 spec/lib/cacher/weights_generator_spec.rb
picky-1.1.4 spec/lib/cacher/weights_generator_spec.rb
picky-1.1.3 spec/lib/cacher/weights_generator_spec.rb
picky-1.1.2 spec/lib/cacher/weights_generator_spec.rb
picky-1.1.1 spec/lib/cacher/weights_generator_spec.rb
picky-1.1.0 spec/lib/cacher/weights_generator_spec.rb