Sha256: da4c6f3f2eb137062836519642c7c0b6655958c038947c446f587c311b423a3f

Contents?: true

Size: 406 Bytes

Versions: 1

Compression:

Stored size: 406 Bytes

Contents

require 'minitest/autorun'
require 'weighted_selection'

class WeightedSelectionTest < MiniTest::Unit::TestCase
  def test_add_items
    sel = WeightedSelection::Engine.new
    sel.add_items([
                           WeightedSelection::Item.new(50, 'Item 1'),
                           WeightedSelection::Item.new(50, 'Item 2')
                       ])

    assert_equal(sel.items.length, 2)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
weighted-selection-1.0.0 test/test_weighted_selection.rb