Sha256: 351fee1e413ac0e7842b7b2a8d27b3e6ca849da1f7d588fd492fd2c4f3eed5e0

Contents?: true

Size: 672 Bytes

Versions: 4

Compression:

Stored size: 672 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Optimizer::Function, '.optimize_functions' do
  subject { object.optimize_functions(functions) }

  let(:object)    { self.class.described_type }
  let(:attribute) { mock('Attribute')         }
  let(:functions) { { attribute => function } }

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

    it { should be_frozen }

    it { should == { attribute => optimized } }
  end

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

    it { should == functions }
  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_functions_spec.rb
veritas-optimizer-0.0.6 spec/unit/veritas/optimizer/function/class_methods/optimize_functions_spec.rb
veritas-optimizer-0.0.5 spec/unit/veritas/optimizer/function/class_methods/optimize_functions_spec.rb
veritas-optimizer-0.0.4 spec/unit/veritas/optimizer/function/class_methods/optimize_functions_spec.rb