Sha256: 3f0054f4e96ba210182132880dc319b7619d0cae4f770ce4bbe2d08e3d017e60

Contents?: true

Size: 636 Bytes

Versions: 5

Compression:

Stored size: 636 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Optimizer::Function::Unary::UnoptimizedOperand, '#optimize' do
  subject { object.optimize }

  let(:described_class) { Class.new(Optimizer) { include Optimizer::Function::Unary }         }
  let(:function)        { Function::Numeric::Absolute.new(Function::Numeric::Absolute.new(1)) }
  let(:object)          { described_class.new(function)                                       }

  before do
    described_class.class_eval { include Optimizer::Function::Unary::UnoptimizedOperand }
    object.should be_optimizable
  end

  it { should eql(Function::Numeric::Absolute.new(1)) }
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
axiom-optimizer-0.1.0 spec/unit/axiom/optimizer/function/unary/unoptimized_operand/optimize_spec.rb
veritas-optimizer-0.0.7 spec/unit/veritas/optimizer/function/unary/unoptimized_operand/optimize_spec.rb
veritas-optimizer-0.0.6 spec/unit/veritas/optimizer/function/unary/unoptimized_operand/optimize_spec.rb
veritas-optimizer-0.0.5 spec/unit/veritas/optimizer/function/unary/unoptimized_operand/optimize_spec.rb
veritas-optimizer-0.0.4 spec/unit/veritas/optimizer/function/unary/unoptimized_operand/optimize_spec.rb