mirror of
https://github.com/ditkrg/rswag.git
synced 2026-01-25 07:16:40 +00:00
Support multiple swagger documents. Add custom_ui_generator. Update readme
This commit is contained in:
16
spec/generators/swagger_rails/custom_ui_generator_spec.rb
Normal file
16
spec/generators/swagger_rails/custom_ui_generator_spec.rb
Normal file
@@ -0,0 +1,16 @@
|
||||
require 'rails_helper'
|
||||
require 'generators/swagger_rails/custom_ui/custom_ui_generator'
|
||||
|
||||
describe SwaggerRails::CustomUiGenerator do
|
||||
include GeneratorSpec::TestCase
|
||||
destination File.expand_path('../tmp', __FILE__)
|
||||
|
||||
before(:all) do
|
||||
prepare_destination
|
||||
run_generator
|
||||
end
|
||||
|
||||
it 'creates a local version of index.html.erb' do
|
||||
assert_file('app/views/swagger_rails/swagger_ui/index.html.erb')
|
||||
end
|
||||
end
|
||||
@@ -7,6 +7,9 @@ describe SwaggerRails::InstallGenerator do
|
||||
|
||||
before(:all) do
|
||||
prepare_destination
|
||||
config_dir = File.expand_path('../../fixtures/config', __FILE__)
|
||||
FileUtils.cp_r(config_dir, destination_root)
|
||||
|
||||
run_generator
|
||||
end
|
||||
|
||||
@@ -17,4 +20,9 @@ describe SwaggerRails::InstallGenerator do
|
||||
it 'creates a swagger_rails initializer' do
|
||||
assert_file('config/initializers/swagger_rails.rb')
|
||||
end
|
||||
|
||||
it 'wires up the swagger routes' do
|
||||
pending('not sure how to test this')
|
||||
this_should_not_get_executed
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user