Sha256: 5aa558da34999ff024bffc97b735cc85eac6f6019b924f58744919e9deaebe96
Contents?: true
Size: 594 Bytes
Versions: 19
Compression:
Stored size: 594 Bytes
Contents
require './spec/spec_helper' describe RestPack::Serializer::Attributes do class CustomSerializer include RestPack::Serializer attributes :a, :b, :c attribute :old_attribute, :key => :new_key end before do @attributes = CustomSerializer.serializable_attributes end it "correctly models specified attributes" do @attributes.length.should == 4 end it "correctly maps normal attributes" do [:a, :b, :c].each do |attr| @attributes[attr].should == attr end end it "correctly maps attribute with :key options" do @attributes[:new_key].should == :old_attribute end end
Version data entries
19 entries across 19 versions & 1 rubygems