Sha256: cd8733ea61a95a683696e6440ef8192ef753945576975d9a3f4c02080cefccc5
Contents?: true
Size: 739 Bytes
Versions: 1
Compression:
Stored size: 739 Bytes
Contents
require 'spec_helper' describe 'Veritas::Relation::Operation::Order#each' do subject { object.each { |tuple| yields << tuple } } let(:klass) { Relation::Operation::Order } let(:relation) { Relation.new([ [ :id, Integer ] ], [ [ 1 ], [ 2 ], [ 3 ] ]) } let(:directions) { [ relation[:id].desc ] } let(:object) { klass.new(relation, directions) } let(:yields) { [] } it_should_behave_like 'a command method' it 'yields each tuple in order' do expect { subject }.to change { yields.dup }. from([]). to([ [ 3 ], [ 2 ], [ 1 ] ]) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
veritas-0.0.2 | spec/unit/veritas/relation/operation/order/each_spec.rb |