Sha256: 41234f45a77e35a071aad1d94217988f51721664944bc236b5fef84f51c887fd

Contents?: true

Size: 715 Bytes

Versions: 10

Compression:

Stored size: 715 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

describe Arstotzka::KeyReader do
  describe 'yard' do
    describe '#read' do
      describe 'Simple Usage' do
        subject(:reader) { described_class.new hash, key }

        let(:key)  { 'the_key' }
        let(:hash) { { theKey: 'value' } }

        it 'reads the value' do
          expect(reader.read).to eq('value')
        end
      end

      describe 'Specifying snakecase' do
        subject(:reader) { described_class.new hash, key, case: :snake }

        let(:key)  { 'TheKey' }
        let(:hash) { { 'the_key' => 'value' } }

        it 'reads the value' do
          expect(reader.read).to eq('value')
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
arstotzka-1.6.2 spec/integration/yard/arstotzka/key_reader_spec.rb
arstotzka-1.6.1 spec/integration/yard/arstotzka/key_reader_spec.rb
arstotzka-1.6.0 spec/integration/yard/arstotzka/key_reader_spec.rb
arstotzka-1.5.0 spec/integration/yard/arstotzka/key_reader_spec.rb
arstotzka-1.4.4 spec/integration/yard/arstotzka/key_reader_spec.rb
arstotzka-1.4.3 spec/integration/yard/arstotzka/key_reader_spec.rb
arstotzka-1.4.2 spec/integration/yard/arstotzka/key_reader_spec.rb
arstotzka-1.4.1 spec/integration/yard/arstotzka/key_reader_spec.rb
arstotzka-1.4.0 spec/integration/yard/arstotzka/key_reader_spec.rb
arstotzka-1.3.2 spec/integration/yard/arstotzka/key_reader_spec.rb