Sha256: c27078144fe2ff90f90b971d06e85be2429610fc9e006f4c855e03b4f4a39d65
Contents?: true
Size: 697 Bytes
Versions: 2
Compression:
Stored size: 697 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Optimizer::Function::Connective::Negation::InvertibleOperand, '#optimizable?' do subject { object.optimizable? } let(:attribute) { Attribute::Integer.new(:id) } let(:negation) { Function::Connective::Negation.new(operand) } let(:object) { described_class.new(negation) } before do expect(object.operation).to be_kind_of(Function::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