Sha256: aef91ee2580f39e413c1363ae4a25c7083530dc0c970b3286737ead0e303ddf4

Contents?: true

Size: 551 Bytes

Versions: 4

Compression:

Stored size: 551 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Optimizer::Algebra::Restriction::Tautology, '#optimize' do
  subject { object.optimize }

  let(:header)    { Relation::Header.new([ [ :id, Integer ] ]) }
  let(:base)      { Relation.new(header, [ [ 1 ] ].each)       }
  let(:predicate) { Function::Proposition::Tautology.instance  }
  let(:relation)  { base.restrict { predicate }                }
  let(:object)    { described_class.new(relation)              }

  before do
    object.should be_optimizable
  end

  it { should equal(base) }
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
veritas-optimizer-0.0.7 spec/unit/veritas/optimizer/algebra/restriction/tautology/optimize_spec.rb
veritas-optimizer-0.0.6 spec/unit/veritas/optimizer/algebra/restriction/tautology/optimize_spec.rb
veritas-optimizer-0.0.5 spec/unit/veritas/optimizer/algebra/restriction/tautology/optimize_spec.rb
veritas-optimizer-0.0.4 spec/unit/veritas/optimizer/algebra/restriction/tautology/optimize_spec.rb