Sha256: 51b073ebcf6d25e10d437dbda8c89c43dca70cb82035a283f799783942abb3ed

Contents?: true

Size: 1.83 KB

Versions: 15

Compression:

Stored size: 1.83 KB

Contents

# frozen_string_literal: true

require 'spec_helper'

describe SwaggerDocsGenerator::Configuration, type: :gem,
                                              broken: true,
                                              name: :configuration do
  before(:example) do
    SwaggerDocsGenerator.configure do |config|
      config.schemes = ['http']
      config.consumes = 'application/vnd.github.v3.full+json'
      config.produces = 'application/vnd.github+json'
      config.host = 'http://example.com'
      config.swagger = '2.2.4'
      config.cleanning = false
      config.doc_class = 'base.rb'
    end
  end

  describe 'with customize value' do
    context 'swagger' do
      let(:variable) { SwaggerDocsGenerator.config.swagger }
      it_behaves_like 'variable exist', '2.2.4'
    end

    context 'cleanning' do
      let(:variable) { SwaggerDocsGenerator.config.cleanning }
      it_behaves_like 'variable exist', false
    end

    context 'base_path' do
      let(:variable) { SwaggerDocsGenerator.config.base_path }
      it_behaves_like 'variable exist', '/'
    end

    context 'doc_class' do
      let(:variable) { SwaggerDocsGenerator.config.doc_class }
      it_behaves_like 'variable exist', 'base.rb'
    end

    context 'schemes' do
      let(:variable) { SwaggerDocsGenerator.config.schemes }
      it_behaves_like 'variable exist', ['http']
    end

    context 'consumes' do
      let(:variable) { SwaggerDocsGenerator.config.consumes }
      it_behaves_like 'variable exist', 'application/vnd.github.v3.full+json'
    end

    context 'produces' do
      let(:variable) { SwaggerDocsGenerator.config.produces }
      it_behaves_like 'variable exist', 'application/vnd.github+json'
    end

    context 'host' do
      let(:variable) { SwaggerDocsGenerator.config.host }
      it_behaves_like 'variable exist', 'http://example.com'
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
swagger_docs_generator-0.5.1 spec/swagger_docs_generator/configuration/configuration_customize_spec.rb
swagger_docs_generator-0.5.0.pre.42 spec/swagger_docs_generator/configuration/configuration_customize_spec.rb
swagger_docs_generator-0.4.0 spec/swagger_docs_generator/configuration/configuration_customize_spec.rb
swagger_docs_generator-0.3.6 spec/swagger_docs_generator/configuration/configuration_customize_spec.rb
swagger_docs_generator-0.3.6.pre.34 spec/swagger_docs_generator/configuration/configuration_customize_spec.rb
swagger_docs_generator-0.3.5 spec/swagger_docs_generator/configuration/configuration_customize_spec.rb
swagger_docs_generator-0.3.5.pre.31 spec/swagger_docs_generator/configuration/configuration_customize_spec.rb
swagger_docs_generator-0.3.4.pre.26 spec/swagger_docs_generator/configuration/configuration_customize_spec.rb
swagger_docs_generator-0.3.4 spec/swagger_docs_generator/configuration/configuration_customize_spec.rb
swagger_docs_generator-0.3.4.pre.23 spec/swagger_docs_generator/configuration/configuration_customize_spec.rb
swagger_docs_generator-0.3.3 spec/swagger_docs_generator/configuration/configuration_customize_spec.rb
swagger_docs_generator-0.3.2 spec/swagger_docs_generator/configuration/configuration_customize_spec.rb
swagger_docs_generator-0.3.1 spec/swagger_docs_generator/configuration/configuration_customize_spec.rb
swagger_docs_generator-0.3.0.pre.19 spec/swagger_docs_generator/configuration/configuration_customize_spec.rb
swagger_docs_generator-0.3.0.pre.18 spec/swagger_docs_generator/configuration/configuration_customize_spec.rb