Sha256: 2632fc4eabc8ab9b6c34a64e93c31132e41534224e4102e620795e7c1c79870a

Contents?: true

Size: 529 Bytes

Versions: 4

Compression:

Stored size: 529 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

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

  let(:object) { self.class.described_type }

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

    it { should equal(optimized) }
  end

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

    it { should equal(function) }
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
veritas-optimizer-0.0.7 spec/unit/veritas/optimizer/function/class_methods/optimize_operand_spec.rb
veritas-optimizer-0.0.6 spec/unit/veritas/optimizer/function/class_methods/optimize_operand_spec.rb
veritas-optimizer-0.0.5 spec/unit/veritas/optimizer/function/class_methods/optimize_operand_spec.rb
veritas-optimizer-0.0.4 spec/unit/veritas/optimizer/function/class_methods/optimize_operand_spec.rb