Sha256: 20bc7083b4f5949e4a15536eb8fac31f0bb245d8e43fd88eba7d19aea28cfa01
Contents?: true
Size: 677 Bytes
Versions: 3
Compression:
Stored size: 677 Bytes
Contents
require 'spec_helper' module Arel describe Skip do before do @relation = Array.new([ [1, 'duck' ], [2, 'duck' ], [3, 'goose'] ], [[:id, Attributes::Integer], [:name, Attributes::String]]) end describe '#call' do it 'removes the first n rows' do @relation \ .skip(1) \ .tap do |relation| rows = relation.call rows.length.should == 2 one, two = *rows one.relation.should == relation one.tuple.should == [2, 'duck'] two.relation.should == relation two.tuple.should == [3, 'goose'] end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
arel-1.0.1 | spec/engines/memory/unit/relations/skip_spec.rb |
arel-1.0.0 | spec/engines/memory/unit/relations/skip_spec.rb |
arel-1.0.0.rc1 | spec/engines/memory/unit/relations/skip_spec.rb |