Sha256: e6ff725ad79114219d5009ccb2705b7a2adbedee0dfe27ae713f338015d812e1
Contents?: true
Size: 835 Bytes
Versions: 1
Compression:
Stored size: 835 Bytes
Contents
require 'spec_helper' describe 'Veritas::Relation::Operation::Combination.combine_tuples' do subject { object.combine_tuples(header, left_tuple, right_tuples) { |tuple| yields << tuple } } let(:left_header) { Relation::Header.new([ [ :id, Integer ] ] ) } let(:right_header) { Relation::Header.new([ [ :name, String ] ] ) } let(:left_tuple) { Tuple.new(left_header, [ 1 ]) } let(:right_tuples) { [ Tuple.new(right_header, [ 'Dan Kubb' ]) ] } let(:header) { left_header | right_header } let(:object) { Relation::Operation::Combination } let(:yields) { [] } it 'yields each combined tuple' do expect { subject }.to change { yields.dup }. from([]). to([ [ 1, 'Dan Kubb' ] ]) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
veritas-0.0.2 | spec/unit/veritas/relation/operation/combination/class_methods/combine_tuples_spec.rb |