Sha256: 8897df0aa38e7305253553ae0373bb350bcb62b9206ec31ad9436e4b82d68b3e

Contents?: true

Size: 489 Bytes

Versions: 3

Compression:

Stored size: 489 Bytes

Contents

#encoding:utf-8

require 'spec_helper'

describe WashOut::Type do

  it "defines custom type" do
    class Abraka1 < WashOut::Type
      map :test => :string
    end
    class Abraka2 < WashOut::Type
      type_name 'test'
      map :foo => Abraka1
    end

    Abraka1.wash_out_param_name.should == 'Abraka1'
    Abraka1.wash_out_param_map.should == {:test => :string}

    Abraka2.wash_out_param_name.should == 'Test'
    Abraka2.wash_out_param_map.should == {:foo => Abraka1}
  end

end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
nogara-wash_out-0.5.2 spec/wash_out/type_spec.rb
wash_out-0.5.2 spec/wash_out/type_spec.rb
wash_out-0.4.2 spec/wash_out/type_spec.rb