Sha256: f792780e9665098787bafc91eea8b1c2f3ffbb21dfa31e56380abf57f084cd02

Contents?: true

Size: 837 Bytes

Versions: 1

Compression:

Stored size: 837 Bytes

Contents

require 'spec_helper'

describe 'Veritas::Relation::Materialized.new' do
  let(:header) { Relation::Header.new([ [ :id, Integer ] ]) }
  let(:tuples) { [ [ 1 ] ]                                  }
  let(:object) { Relation::Materialized                     }

  context 'with directions' do
    subject { object.new(header, tuples, directions) }

    let(:directions) { [ header[:id] ] }

    it { should be_kind_of(object) }

    its(:header) { should equal(header) }

    its(:directions) { should == directions }

    it { should == tuples }
  end

  context 'with no directions' do
    subject { object.new(header, tuples) }

    it { should be_kind_of(object) }

    its(:header) { should equal(header) }

    its(:directions) { should equal(Relation::Operation::Order::DirectionSet::EMPTY) }

    it { should == tuples }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
veritas-0.0.2 spec/unit/veritas/relation/materialized/class_methods/new_spec.rb