Sha256: 285748048b67df25dcc4342c83e130efc4a7cf8773338fe8c0d6e856252f8210

Contents?: true

Size: 724 Bytes

Versions: 5

Compression:

Stored size: 724 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Optimizer::Relation::Operation::Unary::UnchangedHeader, '#optimizable?' do
  subject { object.optimizable? }

  let(:operand)  { mock('Operand', :header => operand_header)               }
  let(:header)   { mock('Header')                                           }
  let(:relation) { mock('Relation', :operand => operand, :header => header) }
  let(:object)   { described_class.new(relation)                            }

  context 'when the header is not changed' do
    let(:operand_header) { header }

    it { should be(true) }
  end

  context 'when the header is changed' do
    let(:operand_header) { mock('Changed Header') }

    it { should be(false) }
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
axiom-optimizer-0.1.0 spec/unit/axiom/optimizer/relation/operation/unary/unchanged_header/optimizable_predicate_spec.rb
veritas-optimizer-0.0.7 spec/unit/veritas/optimizer/relation/operation/unary/unchanged_header/optimizable_spec.rb
veritas-optimizer-0.0.6 spec/unit/veritas/optimizer/relation/operation/unary/unchanged_header/optimizable_spec.rb
veritas-optimizer-0.0.5 spec/unit/veritas/optimizer/relation/operation/unary/unchanged_header/optimizable_spec.rb
veritas-optimizer-0.0.4 spec/unit/veritas/optimizer/relation/operation/unary/unchanged_header/optimizable_spec.rb