Sha256: 9e06bcea208339987c46b9ad4676b1fc24b9b328ebb7387b127b2d24ddca3bc6

Contents?: true

Size: 459 Bytes

Versions: 15

Compression:

Stored size: 459 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')

require 'hamster/set'

describe Hamster::Set do

  [:size, :length].each do |method|

    describe "##{method}" do

      [
        [[], 0],
        [["A"], 1],
        [["A", "B", "C"], 3],
      ].each do |values, result|

        it "returns #{result} for #{values.inspect}" do
          Hamster.set(*values).send(method).should == result
        end

      end

    end

  end

end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
hamster-0.2.5 spec/hamster/set/size_spec.rb
hamster-0.2.4 spec/hamster/set/size_spec.rb
hamster-0.2.3 spec/hamster/set/size_spec.rb
hamster-0.2.2 spec/hamster/set/size_spec.rb
hamster-0.2.1 spec/hamster/set/size_spec.rb
hamster-0.2.0 spec/hamster/set/size_spec.rb
hamster-0.1.23 spec/hamster/set/size_spec.rb
hamster-0.1.22 spec/hamster/set/size_spec.rb
hamster-0.1.21 spec/hamster/set/size_spec.rb
hamster-0.1.20 spec/hamster/set/size_spec.rb
hamster-0.1.19 spec/hamster/set/size_spec.rb
hamster-0.1.18 spec/hamster/set/size_spec.rb
hamster-0.1.17 spec/hamster/set/size_spec.rb
hamster-0.1.16 spec/hamster/set/size_spec.rb
hamster-0.1.15 spec/hamster/set/size_spec.rb