
ruby.api_test.mustache Maven / Gradle / Ivy
=begin
{{> api_info}}
=end
require 'spec_helper'
require 'json'
# Unit tests for {{moduleName}}::{{classname}}
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
# Please update as you see appropriate
{{#operations}}describe '{{classname}}' do
before do
# run before each test
@instance = {{moduleName}}::{{classname}}.new
end
after do
# run after each test
end
describe 'test an instance of {{classname}}' do
it 'should create an instact of {{classname}}' do
@instance.should be_a({{moduleName}}::{{classname}})
end
end
{{#operation}}
# unit tests for {{operationId}}
# {{summary}}
# {{notes}}
{{#allParams}}{{#required}} # @param {{paramName}} {{description}}
{{/required}}{{/allParams}} # @param [Hash] opts the optional parameters
{{#allParams}}{{^required}} # @option opts [{{{dataType}}}] :{{paramName}} {{description}}
{{/required}}{{/allParams}} # @return [{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}nil{{/returnType}}]
describe '{{operationId}} test' do
it "should work" do
# assertion here
# should be_a()
# should be_nil
# should ==
# should_not ==
end
end
{{/operation}}
end
{{/operations}}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy