Sha256: f1a88c0ee315581181e474b7fe8f316dbd55a4e084c63b8f776df203ef3450c0

Contents?: true

Size: 478 Bytes

Versions: 7

Compression:

Stored size: 478 Bytes

Contents

require 'spec_helper'

require 'hamster/set'

describe Hamster::Set do

  describe "#product" do

    [
      [[], 1],
      [[2], 2],
      [[1, 3, 5, 7, 11], 1155],
    ].each do |values, expected|

      describe "on #{values.inspect}" do

        before do
          original = Hamster.set(*values)
          @result = original.product
        end

        it "returns #{expected.inspect}" do
          @result.should == expected
        end

      end

    end

  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
hamster-0.4.3 spec/hamster/set/product_spec.rb
hamster-0.4.2 spec/hamster/set/product_spec.rb
hamster-0.4.0 spec/hamster/set/product_spec.rb
hamster-0.3.10 spec/hamster/set/product_spec.rb
hamster-0.3.9 spec/hamster/set/product_spec.rb
hamster-0.3.8 spec/hamster/set/product_spec.rb
hamster-0.3.7 spec/hamster/set/product_spec.rb