Sha256: 01b49131f7c5690d6e92052c2e5f7d013f0a7500c2b211ac44f9d9e0a02a09de
Contents?: true
Size: 969 Bytes
Versions: 30
Compression:
Stored size: 969 Bytes
Contents
RSpec.describe :build_parameters_spec do link :build_parameters, from: :ree_swagger link :build_mapper_factory, from: :ree_mapper link :build_mapper_strategy, from: :ree_mapper let(:mapper_factory) { strategies = [ build_mapper_strategy(method: :cast, output: :symbol_key_hash), ] build_mapper_factory( strategies: strategies ) } it { caster = mapper_factory.call.use(:cast) do hash :id do string :name end end expect { build_parameters(caster, [:id], false) }.to raise_error( ReeSwagger::BuildParameters::ObjectPathParamError, "path parameter(id) can not be an object" ) } it { caster = mapper_factory.call.use(:cast) do array :id, each: string end expect { build_parameters(caster, [:id], false) }.to raise_error( ReeSwagger::BuildParameters::ArrayPathParamError, "path parameter(id) can not be an array" ) } end
Version data entries
30 entries across 30 versions & 1 rubygems