Sha256: 43cae0f087f4b9af4ab7c75bb2ba734889690e4ecc39d4d1d5e80d5581a4f5c0

Contents?: true

Size: 489 Bytes

Versions: 9

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

9 entries across 9 versions & 1 rubygems

Version Path
wash_out-0.7.1 spec/lib/wash_out/type_spec.rb
wash_out-0.7.0 spec/lib/wash_out/type_spec.rb
wash_out-0.6.1 spec/lib/wash_out/type_spec.rb
wash_out-0.6.0 spec/lib/wash_out/type_spec.rb
wash_out-0.5.6 spec/lib/wash_out/type_spec.rb
wash_out-0.5.4 spec/lib/wash_out/type_spec.rb
wash_out-0.5.3 spec/lib/wash_out/type_spec.rb
wash_out-0.4.1 spec/wash_out/type_spec.rb
wash_out-0.4.0 spec/wash_out/type_spec.rb