Sha256: 6fe10c608dc7c5bb77beed0a91f26f80bd8dc5e8fc2ff8e8c44820c67eab0984
Contents?: true
Size: 927 Bytes
Versions: 2
Compression:
Stored size: 927 Bytes
Contents
require 'spec_helper' describe 'Veritas::Optimizer::Logic::Connective::Conjunction::OptimizableToExclusion#optimizable?' do subject { object.optimizable? } let(:klass) { Optimizer::Logic::Connective::Conjunction::OptimizableToExclusion } let(:attribute) { Attribute::Integer.new(:id) } let(:connective) { left.and(right) } let(:object) { klass.new(connective) } before do object.operation.should be_kind_of(Logic::Connective::Conjunction) end context 'when the operands are optimizable' do let(:left) { attribute.ne(2) } let(:right) { attribute.ne(1) } it { should be(true) } end context 'when the operands are not optimizable' do let(:left) { attribute.ne(1) } let(:right) { attribute.eq(2) } it { should be(false) } end end
Version data entries
2 entries across 2 versions & 1 rubygems