Sha256: ffa76efccc9e04481e29b817b7578d4d7e94f32d7dafa8a92ac5e85e6cc4522f
Contents?: true
Size: 743 Bytes
Versions: 2
Compression:
Stored size: 743 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Optimizer::Function::Connective::Binary::RedundantRight, '#optimizable?' do subject { object.optimizable? } let(:attribute) { Attribute::Integer.new(:id) } let(:left) { attribute.include([1]) } let(:right) { attribute.exclude([2]) } let(:object) { described_class.new(connective) } before do expect(object.operation).to be_kind_of(Function::Connective::Binary) end context 'when the right operand is redundant' do let(:connective) { left.and(left.and(right)) } it { should be(true) } end context 'when the right operand is not redundant' do let(:connective) { left.and(right) } it { should be(false) } end end
Version data entries
2 entries across 2 versions & 1 rubygems