Sha256: 521efb36f64ac0a9c47142ef0d08e6f0724af8e4047049fda2f52aa0fb27ab16
Contents?: true
Size: 620 Bytes
Versions: 3
Compression:
Stored size: 620 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Relation::Materialized, '#optimize' do subject { object.optimize } let(:object) { described_class.new([ [ :id, Integer ] ], body) } context 'with an empty Array' do let(:body) { [] } it { should eql(Relation::Empty.new(object.header)) } it 'returns an equivalent object to the unoptimized operation' do should == object end it_should_behave_like 'an optimize method' end context 'with an nonempty Array' do let(:body) { [ [ 1 ] ] } it { should equal(object) } it_should_behave_like 'an optimize method' end end
Version data entries
3 entries across 3 versions & 2 rubygems