Sha256: 0559c44b45da4a34c6c1a2053f81e9c827abb3bd5ac3613561226f138734c621

Contents?: true

Size: 617 Bytes

Versions: 1

Compression:

Stored size: 617 Bytes

Contents

require 'spec_helper'

RSpec.shared_examples 'swagger loading' do
  it { is_expected.to be_a_kind_of Swagger::APIDeclaration }

  it 'has a swagger spec version' do
    expect(subject.swagger).to eq(2.0)
  end
end

describe Swagger do
  describe '#load' do
    subject(:swagger) { Swagger.load swagger_file }

    context 'json' do
      let(:swagger_file) { 'swagger_spec/examples/v2.0/json/petstore.json' }
      include_examples 'swagger loading'
    end

    context 'yaml' do
      let(:swagger_file) { 'swagger_spec/examples/v2.0/yaml/petstore.yaml' }
      include_examples 'swagger loading'
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
swagger-core-0.2.0 spec/swagger/swagger_spec.rb