Sha256: d8a8b9a2533780874663f9b2043ab34025d034e18f199114cafb4229f016056f

Contents?: true

Size: 429 Bytes

Versions: 4

Compression:

Stored size: 429 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Relation, '#inject_mapper' do
  subject(:relation) { described_class.new([], mapper) }

  fake(:mapper)
  fake(:other_mapper) { Mapper }

  it 'returns new relation with injected new mapper' do
    other_relation = relation.inject_mapper(other_mapper)

    expect(other_relation.relation).to be(relation.relation)
    expect(other_relation.mapper).to be(other_mapper)
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
rom-0.2.0 spec/unit/rom/relation/inject_mapper_spec.rb
rom-relation-0.1.2 spec/unit/rom/relation/inject_mapper_spec.rb
rom-relation-0.1.1 spec/unit/rom/relation/inject_mapper_spec.rb
rom-relation-0.1.0 spec/unit/rom/relation/inject_mapper_spec.rb