spec/unit/axiom/optimizer/algebra/restriction/set_operand/optimize_spec.rb in axiom-optimizer-0.1.0 vs spec/unit/axiom/optimizer/algebra/restriction/set_operand/optimize_spec.rb in axiom-optimizer-0.1.1

- old
+ new

@@ -3,18 +3,18 @@ require 'spec_helper' describe Optimizer::Algebra::Restriction::SetOperand, '#optimize' do subject { object.optimize } - let(:header) { Relation::Header.coerce([ [ :id, Integer ] ]) } - let(:left) { Relation.new(header, LazyEnumerable.new([ [ 1 ] ])) } - let(:right) { Relation.new(header, LazyEnumerable.new([ [ 2 ] ])) } - let(:predicate) { header[:id].eq(1) } - let(:relation) { left.union(right).restrict { predicate } } - let(:object) { described_class.new(relation) } + let(:header) { Relation::Header.coerce([[:id, Integer]]) } + let(:left) { Relation.new(header, LazyEnumerable.new([[1]])) } + let(:right) { Relation.new(header, LazyEnumerable.new([[2]])) } + let(:predicate) { header[:id].eq(1) } + let(:relation) { left.union(right).restrict { predicate } } + let(:object) { described_class.new(relation) } before do - object.should be_optimizable + expect(object).to be_optimizable end it { should be_kind_of(Relation::Operation::Set) } its(:left) { should eql(left.restrict { predicate }) }