spec/unit/veritas/optimizer/algebra/rename/restriction_operand/optimize_spec.rb in veritas-optimizer-0.0.3 vs spec/unit/veritas/optimizer/algebra/rename/restriction_operand/optimize_spec.rb in veritas-optimizer-0.0.4
- old
+ new
@@ -1,14 +1,16 @@
+# encoding: utf-8
+
require 'spec_helper'
describe Optimizer::Algebra::Rename::RestrictionOperand, '#optimize' do
subject { object.optimize }
- let(:header) { Relation::Header.new([ [ :id, Integer ] ]) }
- let(:base) { Relation.new(header, [ [ 1 ] ].each) }
- let(:predicate) { base[:id].eq(1) }
- let(:relation) { base.restrict(predicate).rename(:id => :other_id) }
- let(:object) { described_class.new(relation) }
+ let(:header) { Relation::Header.new([ [ :id, Integer ] ]) }
+ let(:base) { Relation.new(header, [ [ 1 ] ].each) }
+ let(:predicate) { base[:id].eq(1) }
+ let(:relation) { base.restrict { predicate }.rename(:id => :other_id) }
+ let(:object) { described_class.new(relation) }
before do
object.should be_optimizable
end