Sha256: 99aac8bc38846696c312e1070eae9ccd7579e0ebb619685e0e8b8abbfad4dff2

Contents?: true

Size: 442 Bytes

Versions: 3

Compression:

Stored size: 442 Bytes

Contents

require "spec_helper"
require "hamster/list"

describe Hamster::List do
  [:head, :first].each do |method|
    describe "##{method}" do
      [
        [[], nil],
        [["A"], "A"],
        [%w[A B C], "A"],
      ].each do |values, expected|
        context "on #{values.inspect}" do
          it "returns #{expected.inspect}" do
            L[*values].send(method).should == expected
          end
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
files.com-1.0.55 docs/vendor/bundle/ruby/2.5.0/gems/hamster-3.0.0/spec/lib/hamster/list/head_spec.rb
hamster-3.0.0 spec/lib/hamster/list/head_spec.rb
hamster-2.0.0 spec/lib/hamster/list/head_spec.rb