Sha256: 521a9ecada1a2e426d5c4e12dddf4beafd434ddc5391464ad8f3d8a7b5d2bad3
Contents?: true
Size: 648 Bytes
Versions: 4
Compression:
Stored size: 648 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Optimizer::Function::Connective::Binary::RedundantRightOperand, '#optimize' do subject { object.optimize } let(:attribute) { Attribute::Integer.new(:id) } let(:left) { attribute.include([ 1 ]) } let(:right) { attribute.exclude([ 2 ]) } let(:connective) { left.and(left.and(right)) } let(:object) { described_class.new(connective) } before do object.should be_optimizable end it { should be_kind_of(Function::Connective::Conjunction) } its(:left) { should eql(attribute.eq(1)) } its(:right) { should eql(attribute.ne(2)) } end
Version data entries
4 entries across 4 versions & 1 rubygems