Sha256: 77f68c276c96b097e33675b19e0f9297359e2d07cd259daa15214a5501939da6

Contents?: true

Size: 717 Bytes

Versions: 4

Compression:

Stored size: 717 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_instance_of(Relation::Header) }

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

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
axiom-0.1.0 spec/unit/axiom/relation/operation/combination/header_spec.rb
veritas-0.0.7 spec/unit/veritas/relation/operation/combination/header_spec.rb
veritas-0.0.6 spec/unit/veritas/relation/operation/combination/header_spec.rb
veritas-0.0.5 spec/unit/veritas/relation/operation/combination/header_spec.rb