Sha256: 2e9a8273832194b9058e545132a36ab33eab037ea66bed0552e5c5d966ca917f
Contents?: true
Size: 750 Bytes
Versions: 1
Compression:
Stored size: 750 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Relation::Operation::Limit::Methods, '#take' do subject { object.take(limit) } let(:described_class) { Relation } let(:limit) { 1 } let(:relation) { described_class.new([ [ :id, Integer ] ], LazyEnumerable.new([ [ 1 ], [ 2 ] ])) } let(:object) { relation.sort_by { |r| r.id } } it { should be_instance_of(Relation::Operation::Limit) } its(:limit) { should == limit } it 'behaves the same as Array#take' do should == object.to_a.take(limit) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
axiom-0.1.0 | spec/unit/axiom/relation/operation/limit/methods/take_spec.rb |