Sha256: 6ad769711aa77daadae4c141c1ae94bfa18875b5e951a45c0078e71abc149047

Contents?: true

Size: 502 Bytes

Versions: 2

Compression:

Stored size: 502 Bytes

Contents

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

describe Hamster::List do

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

    describe "##{method}" do

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

        describe "on #{values.inspect}" do

          list = Hamster.list(*values)

          it "returns #{result}" do
            list.send(method).should == result
          end

        end

      end

    end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
hamster-0.1.12 spec/hamster/list/size_spec.rb
hamster-0.1.11 spec/hamster/list/size_spec.rb