Sha256: 63680307a0857be34aff8a3de46cfec2445ce5216a7ebe0d3123540797b73319
Contents?: true
Size: 847 Bytes
Versions: 4
Compression:
Stored size: 847 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe 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) { self.class.described_type } let(:yields) { [] } it 'yields each combined tuple' do expect { subject }.to change { yields.dup }. from([]). to([ [ 1, 'Dan Kubb' ] ]) end end
Version data entries
4 entries across 4 versions & 1 rubygems