Sha256: b5b49d8bad3a2c69bfc73b437379eb515d545367400f9bb40169703ef3187606
Contents?: true
Size: 737 Bytes
Versions: 5
Compression:
Stored size: 737 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Optimizer::Function::Connective::Binary::EqualOperands, '#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::Binary) end context 'when left and right are equivalent' do let(:left) { attribute.eq(1) } let(:right) { attribute.eq(1) } it { should be(true) } end context 'when left and right are not equivalent' do let(:left) { attribute.eq(1) } let(:right) { attribute.ne(1) } it { should be(false) } end end
Version data entries
5 entries across 5 versions & 2 rubygems