spec/integration/veritas/algebra/intersection/optimize_spec.rb in veritas-optimizer-0.0.3 vs spec/integration/veritas/algebra/intersection/optimize_spec.rb in veritas-optimizer-0.0.4
- old
+ new
@@ -1,5 +1,7 @@
+# encoding: utf-8
+
require 'spec_helper'
describe Algebra::Intersection, '#optimize' do
subject { object.optimize }
@@ -45,12 +47,12 @@
it_should_behave_like 'an optimize method'
end
context 'left is an empty relation when optimized' do
- let(:left) { Algebra::Restriction.new(original_left, Logic::Proposition::Contradiction.instance) }
- let(:right) { original_right }
+ let(:left) { Algebra::Restriction.new(original_left, Function::Proposition::Contradiction.instance) }
+ let(:right) { original_right }
it { should eql(Relation::Empty.new(left.header | right.header)) }
it 'returns an equivalent relation to the unoptimized operation' do
should == object
@@ -68,11 +70,11 @@
it_should_behave_like 'an optimize method'
end
context 'right is an empty relation when optimized' do
- let(:left) { original_left }
- let(:right) { Algebra::Restriction.new(original_right, Logic::Proposition::Contradiction.instance) }
+ let(:left) { original_left }
+ let(:right) { Algebra::Restriction.new(original_right, Function::Proposition::Contradiction.instance) }
it { should eql(Relation::Empty.new(left.header | right.header)) }
it 'returns an equivalent relation to the unoptimized operation' do
should == object