Sha256: 6d5ba3457e7d41c5b6ae632dffd74a8523bc6d74719757538ef8df46d5d4b513
Contents?: true
Size: 754 Bytes
Versions: 1
Compression:
Stored size: 754 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Optimizer::Function::Connective::Conjunction::OptimizableToExclusion, '#optimizable?' do subject { object.optimizable? } let(:attribute) { Attribute::Integer.new(:id) } let(:connective) { left.and(right) } let(:object) { described_class.new(connective) } before do object.operation.should be_kind_of(Function::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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
veritas-optimizer-0.0.4 | spec/unit/veritas/optimizer/function/connective/conjunction/optimizable_to_exclusion/optimizable_spec.rb |