Sha256: a89a357d5d17d41eb50453046fbae381a77b5c86e6e87a3fc9d653dcb5dcac52

Contents?: true

Size: 550 Bytes

Versions: 1

Compression:

Stored size: 550 Bytes

Contents

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

describe Hamster::Stack do

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

    describe "##{method}" do

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

        describe "on #{values.inspect}" do

          before do
            @stack = Hamster.stack(*values)
          end

          it "returns #{expected}" do
            @stack.send(method).should == expected
          end

        end

      end

    end

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hamster-0.1.14 spec/hamster/stack/size_spec.rb