Sha256: 12b2cca0227cb2f01f3bd5e473ea21ab5163522938386692d9c14d75db0cfa7e
Contents?: true
Size: 1.55 KB
Versions: 15
Compression:
Stored size: 1.55 KB
Contents
# frozen_string_literal: true require 'spec_helper' describe SwaggerDocsGenerator::Actions::Path, type: :parser, name: :params_path do let(:param_name) { nil } let(:param_description) { nil } let(:param_required) { nil } let(:param_type) { nil } let(:param) do pname = param_name pdescription = param_description prequired = param_required ptype = param_type SwaggerDocsGenerator::Actions::Parameter.new do path do name pname description pdescription required prequired type ptype end end end context 'when attribute complete' do let(:param_name) { Faker::Color.color_name } let(:param_description) { Faker::Beer.name } let(:param_required) { Faker::Boolean.boolean } let(:param_type) { Faker::Name.first_name } it_behaves_like 'parameters path haves' end context 'when attribute is incomplete' do it_behaves_like 'parameters path haves' end context 'when name attribute alone' do let(:param_name) { Faker::Color.color_name } it_behaves_like 'parameters path haves' end context 'when description attribute alone' do let(:param_description) { Faker::Beer.name } it_behaves_like 'parameters path haves' end context 'when required attribute alone' do let(:param_required) { Faker::Boolean.boolean } it_behaves_like 'parameters path haves' end context 'when type attribute alone' do let(:param_type) { Faker::Name.first_name } it_behaves_like 'parameters path haves' end end
Version data entries
15 entries across 15 versions & 1 rubygems