Sha256: 5766f8c6d017958682553d2bae1f1d03e4e29ebfc0f75159b30b1555521faa20
Contents?: true
Size: 688 Bytes
Versions: 1
Compression:
Stored size: 688 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Optimizer::Relation::Operation::Limit::ZeroLimit, '#optimizable?' do subject { object.optimizable? } let(:base) { Relation.new([ [ :id, Integer ] ], [ [ 1 ] ].each).order } let(:relation) { base.take(limit) } let(:object) { described_class.new(relation) } before do object.operation.should be_kind_of(Relation::Operation::Limit) end context 'when the operation limit is 0' do let(:limit) { 0 } it { should be(true) } end context 'when the operation limit is not 0' do let(:limit) { 1 } it { should be(false) } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
veritas-optimizer-0.0.4 | spec/unit/veritas/optimizer/relation/operation/limit/zero_limit/optimizable_spec.rb |