Sha256: d2892f759b5d494a8e0c745302e7c9711d281c5420c522a256776d07fabb758a

Contents?: true

Size: 491 Bytes

Versions: 1

Compression:

Stored size: 491 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

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

  let(:base)      { Relation.new([[:id, Integer]], [[1]]) }
  let(:predicate) { base[:id].eq(1)                       }
  let(:relation)  { base.restrict { predicate }           }
  let(:object)    { described_class.new(relation)         }

  before do
    expect(object.operation).to be_kind_of(Algebra::Restriction)
  end

  it { should be(predicate) }
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
axiom-optimizer-0.1.1 spec/unit/axiom/optimizer/algebra/restriction/predicate_spec.rb