Sha256: 75b2d8e43b44e8976c9c2c845e446ebd4c246aaecd2e5e5144e0b81311ba4062

Contents?: true

Size: 539 Bytes

Versions: 4

Compression:

Stored size: 539 Bytes

Contents

RSpec.describe 'the API', type: :apivore, order: :defined do
  subject { Apivore::SwaggerChecker.instance_for(WestfieldSwagger.path_for(<%= WestfieldSwagger.api_version %>)) }

  context 'has valid paths' do
    # Tests go here

    # Example:
    let(:params) { { "example_id" => 1 } }
    specify do
      expect(subject).to validate(
        :get, '/examples/{example_id}.json', 200, params
      )
    end

  end

  context 'and' do
    it 'tests all documented routes' do
      expect(subject).to validate_all_paths
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
westfield_swagger-1.2.6 lib/generators/swagger/templates/spec.rb
westfield_swagger-1.2.5 lib/generators/swagger/templates/spec.rb
westfield_swagger-1.2.4 lib/generators/swagger/templates/spec.rb
westfield_swagger-1.2.3 lib/generators/swagger/templates/spec.rb