Sha256: 9876e48d6101dc672e80aba91eb6d5462a14a084d0cef84b69a5e29bd2f11edc
Contents?: true
Size: 681 Bytes
Versions: 1
Compression:
Stored size: 681 Bytes
Contents
require 'spec_helper' require 'fixture/record/article' require 'fixture/record/section' RSpec.describe Typekit::Element::Serialization do let(:article_class) { Fixture::Record::Article } let(:section_class) { Fixture::Record::Section } describe '#serialize' do let(:attributes) do { id: 1, title: 'Conversation', sections: [{ id: 1, content: 'Hello' }, { id: 2, content: 'Bye' }] } end subject do object = article_class.new(attributes) expect(object.sections.first).to be_kind_of(section_class) object end it 'returns a Hash' do expect(subject.serialize).to eq(attributes) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
typekit-client-0.0.6 | spec/lib/typekit/element/serialization_spec.rb |