Sha256: ac7418d6aa65d32794285c52553fbf407da8e1dd8521339e3aa060fc7136807e

Contents?: true

Size: 484 Bytes

Versions: 5

Compression:

Stored size: 484 Bytes

Contents

#encoding:utf-8

require 'spec_helper'

describe WashOut::Param do

  it "loads custom_types" do
    class Abraka1 < WashOut::Type
      map(
        :test => :string
      )
    end
    class Abraka2 < WashOut::Type
      type_name 'test'
      map :foo => Abraka1
    end

    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 & 2 rubygems

Version Path
nogara-wash_out-0.5.2 spec/wash_out/param_spec.rb
wash_out-0.5.2 spec/wash_out/param_spec.rb
wash_out-0.4.2 spec/wash_out/param_spec.rb
wash_out-0.4.1 spec/wash_out/param_spec.rb
wash_out-0.4.0 spec/wash_out/param_spec.rb