Sha256: 4f5a455a7d633170cbce316a7be92cc0ac8af336464008aa311220d5d3948a07
Contents?: true
Size: 788 Bytes
Versions: 3
Compression:
Stored size: 788 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Optimizer::Relation::Operation::Unary::OrderOperand, '#optimize' do subject { object.optimize } let(:described_class) { Class.new(Optimizer::Relation::Operation::Unary) } let(:base) { Relation.new([ [ :id, Integer ] ], [].each) } let(:operand) { base.sort_by { |r| r.id } } let(:relation) { operand.project([]) } let(:object) { described_class.new(relation) } before do described_class.class_eval do include Optimizer::Relation::Operation::Unary::OrderOperand def wrap_operand 'Optimized' end end object.should be_optimizable end it { should eql('Optimized') } end
Version data entries
3 entries across 3 versions & 1 rubygems