Sha256: 5bfae16be5219da876e97200d8951b49675ab3dcf5e348133c0345a5454269b1

Contents?: true

Size: 754 Bytes

Versions: 5

Compression:

Stored size: 754 Bytes

Contents

#encoding:utf-8

require 'spec_helper'

describe WashOut::Param do

  class Abraka1 < WashOut::Type
    map(
      :test => :string
    )
  end
  class Abraka2 < WashOut::Type
    type_name 'test'
    map :foo => Abraka1
  end

  it "loads custom_types" do
    map = WashOut::Param.parse_def Abraka2

    map.should be_a_kind_of(Array)
    map[0].name.should == 'value'
    map[0].map[0].name.should == 'foo'
    map[0].map[0].map[0].name.should == 'test'
  end

  it "respects camelization setting" do
    WashOut::Engine.camelize_wsdl = true

    map = WashOut::Param.parse_def Abraka2

    map.should be_a_kind_of(Array)
    map[0].name.should == 'Value'
    map[0].map[0].name.should == 'Foo'
    map[0].map[0].map[0].name.should == 'Test'
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
wash_out-0.6.1 spec/lib/wash_out/param_spec.rb
wash_out-0.6.0 spec/lib/wash_out/param_spec.rb
wash_out-0.5.6 spec/lib/wash_out/param_spec.rb
wash_out-0.5.4 spec/lib/wash_out/param_spec.rb
wash_out-0.5.3 spec/lib/wash_out/param_spec.rb