Sha256: 298c39c0d6d08f7a2c558a2bd270ef669deac3b3a05cbed31b93d257f03ae3d6

Contents?: true

Size: 351 Bytes

Versions: 3

Compression:

Stored size: 351 Bytes

Contents

require 'spec_helper'

describe Array do
  with_minimum_ruby('2.3.0') do
    describe '#dig' do
      let(:array) { Hashie::Array.new([:a, :b, :c]) }

      it 'works with a string index' do
        expect(array.dig('0')).to eq(:a)
      end

      it 'works with a numeric index' do
        expect(array.dig(1)).to eq(:b)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
logstash-input-salesforce-3.0.0 vendor/jruby/1.9/gems/hashie-3.4.6/spec/hashie/array_spec.rb
hashie-3.4.6 spec/hashie/array_spec.rb
hashie-3.4.5 spec/hashie/array_spec.rb