mirror of
https://github.com/ditkrg/rswag.git
synced 2026-01-25 15:22:56 +00:00
Support mount-specific swagger_root and add swagger_filter setting
This commit is contained in:
@@ -1,26 +1,34 @@
|
||||
require 'rails_helper'
|
||||
require 'generators/swagger_rails/install/install_generator'
|
||||
|
||||
describe SwaggerRails::InstallGenerator do
|
||||
include GeneratorSpec::TestCase
|
||||
destination File.expand_path('../tmp', __FILE__)
|
||||
module SwaggerRails
|
||||
|
||||
before(:all) do
|
||||
prepare_destination
|
||||
config_dir = File.expand_path('../../fixtures/config', __FILE__)
|
||||
FileUtils.cp_r(config_dir, destination_root)
|
||||
describe InstallGenerator do
|
||||
include GeneratorSpec::TestCase
|
||||
destination File.expand_path('../tmp', __FILE__)
|
||||
|
||||
run_generator
|
||||
before(:all) do
|
||||
prepare_destination
|
||||
fixtures_dir = File.expand_path('../fixtures', __FILE__)
|
||||
FileUtils.cp_r("#{fixtures_dir}/config", destination_root)
|
||||
FileUtils.cp_r("#{fixtures_dir}/spec", destination_root)
|
||||
|
||||
run_generator
|
||||
end
|
||||
|
||||
it 'creates a default swagger directory' do
|
||||
assert_directory('swagger/v1')
|
||||
end
|
||||
|
||||
it 'installs swagger_rails initializer' do
|
||||
assert_file('config/initializers/swagger_rails.rb')
|
||||
end
|
||||
|
||||
it 'installs the swagger_helper for rspec' do
|
||||
assert_file('spec/swagger_helper.rb')
|
||||
end
|
||||
|
||||
it 'wires up the swagger routes'
|
||||
# Not sure how to test this
|
||||
end
|
||||
|
||||
it 'creates a default swagger directory' do
|
||||
assert_directory('swagger/v1')
|
||||
end
|
||||
|
||||
it 'creates a swagger_rails initializer' do
|
||||
assert_file('config/initializers/swagger_rails.rb')
|
||||
end
|
||||
|
||||
it 'wires up the swagger routes'
|
||||
# Not sure how to test this
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user