Sha256: ac5783f91980fce89bdfc851c2aa59e15f6e1304dad055e1d26225a26e51e50c
Contents?: true
Size: 609 Bytes
Versions: 8
Compression:
Stored size: 609 Bytes
Contents
require 'spec_helper' require 'json-schema' describe Swaggard, '.get_doc' do let(:controller_path) { File.expand_path('../../fixtures/dummy/app/controllers/**/*.rb', __FILE__) } let(:api_json) { File.read(File.expand_path('../../fixtures/api.json', __FILE__)) } let(:host) { 'localhost:3000' } it 'generates the expected swagger json' do Swaggard.configure do |config| config.controllers_path = controller_path config.routes = Dummy::Application.routes.routes end swagger_json = JSON.dump(Swaggard.get_doc(host)) expect(swagger_json).to eq(api_json) end end
Version data entries
8 entries across 8 versions & 1 rubygems