mirror of
https://github.com/ditkrg/rswag.git
synced 2026-01-25 07:16:40 +00:00
Merge pull request #254 from fooki/master
Parameterize the pattern for test locations
This commit is contained in:
@@ -5,7 +5,10 @@ namespace :rswag do
|
||||
|
||||
desc 'Generate Swagger JSON files from integration specs'
|
||||
RSpec::Core::RakeTask.new('swaggerize') do |t|
|
||||
t.pattern = 'spec/requests/**/*_spec.rb, spec/api/**/*_spec.rb, spec/integration/**/*_spec.rb'
|
||||
t.pattern = ENV.fetch(
|
||||
'PATTERN',
|
||||
'spec/requests/**/*_spec.rb, spec/api/**/*_spec.rb, spec/integration/**/*_spec.rb'
|
||||
)
|
||||
|
||||
# NOTE: rspec 2.x support
|
||||
if Rswag::Specs::RSPEC_VERSION > 2 && Rswag::Specs.config.swagger_dry_run
|
||||
@@ -18,4 +21,3 @@ namespace :rswag do
|
||||
end
|
||||
|
||||
task :rswag => ['rswag:specs:swaggerize']
|
||||
|
||||
|
||||
Reference in New Issue
Block a user