Sha256: 9e52fc07912a5b7523f6b02d2136dcb4f5461d9923d1f1d2f683c40b02084677
Contents?: true
Size: 636 Bytes
Versions: 1
Compression:
Stored size: 636 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Relation::Operation::Limit, '#each' do subject { object.each { |tuple| yields << tuple } } let(:relation) { Relation.new([ [ :id, Integer ] ], [ [ 1 ], [ 2 ], [ 3 ] ]) } let(:order) { relation.order } let(:object) { described_class.new(order, 1) } let(:yields) { [] } it_should_behave_like 'an #each method' it 'yields each tuple' do expect { subject }.to change { yields.dup }. from([]). to([ [ 1 ] ]) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
veritas-0.0.4 | spec/unit/veritas/relation/operation/limit/each_spec.rb |