rswag/test-app/spec/rake/rswag_specs_swaggerize_spec.rb
Jay Danielian 297cc447c8 Gets v3 request example saving as well as response example saving
Adds rubocop to the gemset

adds guard to the gemset for testing
2019-07-05 15:59:47 -04:00

19 lines
513 B
Ruby

# frozen_string_literal: true
require 'spec_helper'
require 'rake'
describe 'rswag:specs:swaggerize' do
let(:swagger_root) { Rails.root.to_s + '/swagger' }
before do
TestApp::Application.load_tasks
FileUtils.rm_r(swagger_root) if File.exist?(swagger_root)
end
it 'generates Swagger JSON files from integration specs' do
Rake::Task['rswag:specs:swaggerize'].invoke
# expect { }.not_to raise_exception(StandardError)
expect(File).to exist("#{swagger_root}/v1/swagger.json")
end
end