Sha256: dc0712c16b5f664e8cfa276c0948f2952ba43ed9f7793b4fc66c5f958997e0b4
Contents?: true
Size: 846 Bytes
Versions: 4
Compression:
Stored size: 846 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Optimizer::Function::Unary::UnoptimizedOperand, '#optimizable?' do subject { object.optimizable? } let(:described_class) { Class.new(Optimizer) { include Optimizer::Function::Unary } } let(:function) { Class.new(Veritas::Function) { include Veritas::Function::Unary }.new(operand) } let(:object) { described_class.new(function) } before do described_class.class_eval { include Optimizer::Function::Unary::UnoptimizedOperand } end context 'when the operand is optimizable' do let(:operand) { Veritas::Function::Numeric::Absolute.new(1) } it { should be(true) } end context 'when the operand is not optimizable' do let(:operand) { 1 } it { should be(false) } end end
Version data entries
4 entries across 4 versions & 1 rubygems