Sha256: d0d3cf4dc98dcd361f1f9489e794bea8eb76683441431ff55ec68435a4dfeb03

Contents?: true

Size: 513 Bytes

Versions: 2

Compression:

Stored size: 513 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Optimizer::Function, '.optimize_operand' do
  subject { object.optimize_operand(function) }

  let(:object) { described_class }

  context 'when optimizable' do
    let(:optimized) { double('Optimized')                        }
    let(:function)  { double('Optimizable', optimize: optimized) }

    it { should be(optimized) }
  end

  context 'when not optimizable' do
    let(:function) { double('Not Optimizable') }

    it { should be(function) }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
axiom-optimizer-0.2.0 spec/unit/axiom/optimizer/function/class_methods/optimize_operand_spec.rb
axiom-optimizer-0.1.1 spec/unit/axiom/optimizer/function/class_methods/optimize_operand_spec.rb