19 lines
488 B
Ruby
19 lines
488 B
Ruby
require 'spec_helper'
|
|
require 'apivore'
|
|
|
|
# we want to load a local file in YAML-format instead of a served JSON file
|
|
class SwaggerCheckerFile < Apivore::SwaggerChecker
|
|
def fetch_swagger!
|
|
YAML.load(File.read(swagger_path))
|
|
end
|
|
end
|
|
|
|
describe 'API v1', type: :apivore, order: :defined do
|
|
include ApiHelper
|
|
|
|
subject { SwaggerCheckerFile.instance_for Rails.root.join('doc', 'swagger.v1.yml') }
|
|
|
|
it 'tests all documented routes' do
|
|
is_expected.to validate_all_paths
|
|
end
|
|
end
|