Sha256: 8c5b6d6f60df5d0c4d42c4c7ebaeb6f890c7f23b246f3cfa77f742018dc0a8bb

Contents?: true

Size: 464 Bytes

Versions: 1

Compression:

Stored size: 464 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Mapper::Header, '#wrap' do
  subject(:header) { left.wrap(model: mapper) }

  let(:left) { Mapper::Header.build([[:id], [:name]]) }
  let(:mapper) { Mapper.build([[:id], [:title]]) }

  it 'returns a header with embedded value attribute' do
    expected = Mapper::Header.build([
      [:id], [:name], mapper.attribute(Mapper::Attribute::EmbeddedValue, :model)
    ])

    expect(header).to eq(expected)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rom-0.2.0 spec/unit/rom/mapper/header/wrap_spec.rb