Sha256: f2218603c51834cdccb5cdf3aae602640965470a99f07766651ee6d5a0da2988

Contents?: true

Size: 713 Bytes

Versions: 1

Compression:

Stored size: 713 Bytes

Contents

# encoding: utf-8

require 'spec_helper'
require File.expand_path('../fixtures/classes', __FILE__)

describe Relation::Operation::Combination, '#header' do
  subject { object.header }

  let(:described_class) { CombinationOperationSpecs::Object                        }
  let(:left)            { Relation.new([ [ :id,   Integer ] ], [ [ 1 ], [ 2 ] ])   }
  let(:right)           { Relation.new([ [ :name, String  ] ], [ [ 'Dan Kubb' ] ]) }
  let(:object)          { described_class.new(left, right)                         }

  it_should_behave_like 'an idempotent method'

  it { should be_kind_of(Relation::Header) }

  it 'unions the headers' do
    should == [ [ :id, Integer ], [ :name, String ] ]
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
veritas-0.0.4 spec/unit/veritas/relation/operation/combination/header_spec.rb