Sha256: 12ca9223342f4d359c6e0de63d7ef084bf0b63fb4e037634ce33497b41613112
Contents?: true
Size: 857 Bytes
Versions: 4
Compression:
Stored size: 857 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Optimizer::Function::Connective::Disjunction::ContradictionLeftOperand, '#optimizable?' do subject { object.optimizable? } let(:attribute) { Attribute::Integer.new(:id) } let(:connective) { Function::Connective::Disjunction.new(left, right) } let(:object) { described_class.new(connective) } before do object.operation.should be_kind_of(Function::Connective::Disjunction) end context 'when right is a tautology' do let(:left) { Function::Proposition::Contradiction.instance } let(:right) { attribute.eq(1) } it { should be(true) } end context 'when right is not a tautology' do let(:left) { attribute.eq(1) } let(:right) { attribute.eq(1) } it { should be(false) } end end
Version data entries
4 entries across 4 versions & 1 rubygems