spec/unit/veritas/optimizer/relation/operation/unary/materialized_operand/optimizable_spec.rb in veritas-optimizer-0.0.3 vs spec/unit/veritas/optimizer/relation/operation/unary/materialized_operand/optimizable_spec.rb in veritas-optimizer-0.0.4

- old
+ new

@@ -1,11 +1,14 @@ +# encoding: utf-8 + require 'spec_helper' describe Optimizer::Relation::Operation::Unary::MaterializedOperand, '#optimizable?' do subject { object.optimizable? } - let(:relation) { mock('Relation', :operand => operand) } - let(:object) { described_class.new(relation) } + let(:header) { mock('Header') } + let(:relation) { mock('Relation', :operand => operand, :header => header) } + let(:object) { described_class.new(relation) } context 'when the operand is materialized' do let(:operand) { Relation::Materialized.new([ [ :id, Integer ] ], [ [ 1 ] ]) } it { should be(true) }