Sha256: 3da5febe6029e20bef279406e3ecbb98f9c8be549004a8ab9c06be80bc8f0719
Contents?: true
Size: 1.02 KB
Versions: 1
Compression:
Stored size: 1.02 KB
Contents
#encoding:utf-8 require 'spec_helper' describe WashOutFork::Type do it "defines custom type" do class Abraka1 < WashOutFork::Type map :test => :string end class Abraka2 < WashOutFork::Type type_name 'test' map :foo => Abraka1 end expect(Abraka1.wash_out_fork_param_name).to eq 'abraka1' expect(Abraka1.wash_out_fork_param_map).to eq({:test => :string}) expect(Abraka2.wash_out_fork_param_name).to eq 'test' expect(Abraka2.wash_out_fork_param_map).to eq({:foo => Abraka1}) end it "allows arrays inside custom types" do class Abraka1 < WashOutFork::Type map :test => :string end class Abraka2 < WashOutFork::Type type_name 'test' map :foo => [:bar => Abraka1] end expect(Abraka1.wash_out_fork_param_name).to eq 'abraka1' expect(Abraka1.wash_out_fork_param_map).to eq({:test => :string}) expect(Abraka2.wash_out_fork_param_name).to eq 'test' expect(Abraka2.wash_out_fork_param_map).to eq({:foo => [:bar => Abraka1]}) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
wash_out_fork-0.0.1 | spec/lib/wash_out/type_spec.rb |