Sha256: a6eace7c2827dca4b73e836c17336cf18dbd32bbeef551952b9be84e479683e4
Contents?: true
Size: 797 Bytes
Versions: 2
Compression:
Stored size: 797 Bytes
Contents
require 'spec_helper' describe 'Veritas::Optimizer::Logic::Connective::Negation::InvertibleOperand#optimizable?' do subject { object.optimizable? } let(:klass) { Optimizer::Logic::Connective::Negation::InvertibleOperand } let(:attribute) { Attribute::Integer.new(:id) } let(:negation) { Logic::Connective::Negation.new(operand) } let(:object) { klass.new(negation) } before do object.operation.should be_kind_of(Logic::Connective::Negation) end context 'when operand is invertible' do let(:operand) { attribute.eq(1) } it { should be(true) } end context 'when operand is not invertible' do let(:operand) { proc { true } } it { should be(false) } end end
Version data entries
2 entries across 2 versions & 1 rubygems