swagger-api / swagger-codegen

swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.
http://swagger.io
Apache License 2.0
16.9k stars 6.03k forks source link

[Ruby] Rakefile for running multiple test cases #3634

Open Shruti-R opened 8 years ago

Shruti-R commented 8 years ago
Description

I would like to run multiple test cases written using minitest; it would be good to have Rakefile generated for the same to that rake task can be incorporated to run all the test cases.

# file: Rakefile
require 'rake/testtask'

Rake::TestTask.new do |task|
  task.libs << %w(test lib)
  task.pattern = 'test/test_*.rb'
end

task :default => :test
Swagger-codegen version

Version 2.1.5

wing328 commented 8 years ago

@Shruti-R I believe starting from stable version v2.1.6, Ruby client generator also outputs rspec (not minitest) test cases for the Ruby API client. Have you checked that out?

You can simply run rspec to run all the tests under the spec folder.

wing328 commented 8 years ago

@Shruti-R if you want to contribute a Rakefile to perform various tasks, we welcome the contribution and let me know if you need help with the PR.

ezkl commented 7 years ago

@wing328 Are you aware of anyone working on this? If not, I think I can contribute a patch.

EDIT: I was thinking something along the lines of https://github.com/ezkl/swagger-codegen/commit/12536acd272f316c425a0a2ac951e41bc94f43d2

wing328 commented 7 years ago

@wing328 Are you aware of anyone working on this? If not, I think I can contribute a patch.

Not that I'm aware of so please kindly contribute if you've time

EDIT: I was thinking something along the lines of ezkl@12536ac

Looks good to me 👍