Sha256: 2d6665a8d436fcf3db72de7bb6d9323a76bc3ebf0dfed95ab13676f6f58dfc3c

Contents?: true

Size: 495 Bytes

Versions: 4

Compression:

Stored size: 495 Bytes

Contents

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

require 'hamster/list'

describe Hamster::List do

  describe "#head" do

    [
      [[], nil],
      [["A"], "A"],
      [["A", "B", "C"], "A"],
    ].each do |values, expected|

      describe "on #{values.inspect}" do

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

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

      end

    end

  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
hamster-0.1.19 spec/hamster/list/head_spec.rb
hamster-0.1.18 spec/hamster/list/head_spec.rb
hamster-0.1.17 spec/hamster/list/head_spec.rb
hamster-0.1.16 spec/hamster/list/head_spec.rb