Sha256: 4cf1cf42916a463fe5345928b93346c2b33654704395da399c2a0f26a2ea73bf

Contents?: true

Size: 851 Bytes

Versions: 1

Compression:

Stored size: 851 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

describe Arstotzka::Config do
  describe 'yard' do
    subject(:config) { Arstotzka.config }

    describe '#options' do
      let(:overrides) { { klass: Person } }

      let(:expected) do
        {
          after:      false,
          after_each: nil,
          cached:     false,
          case:       :snake,
          compact:    false,
          default:    nil,
          flatten:    false,
          json:       :json,
          klass:      Person,
          type:       :none
        }
      end

      before do
        Arstotzka.configure do |config|
          config.case :snake
        end
      end

      after { Arstotzka.reset_config }

      it 'configure options to use snake case' do
        expect(config.options(overrides).to_h).to eq(expected)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
arstotzka-1.4.0 spec/integration/yard/arstotzka/config_spec.rb