Sha256: 08db234671fe5a3ddaf4fefbdcbb7880f8944d248c4d746cf9c7b2c806f9515f

Contents?: true

Size: 771 Bytes

Versions: 1

Compression:

Stored size: 771 Bytes

Contents

require 'spec_helper'
module Alf
  module Relvar
    describe Virtual, 'OO relational language' do

      let(:expr){ Algebra::Operand::Named.new(:suppliers, self) }
      let(:base){ Base.new(expr)                                }
      let(:rv)  { Virtual.new(base)                             }

      subject{ rv.project([:sid]) }

      it 'is a relation variable' do
        subject.should be_a(Relvar)
      end

      it 'is a virtual relation variable' do
        subject.should be_a(Relvar::Virtual)
      end

      it 'should have a projection expression' do
        subject.expr.should be_a(Algebra::Project)
      end

      it 'should have the base relvar as projection operand' do
        subject.expr.operand.should be(base)
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
alf-core-0.15.0 spec/unit/alf-relvar/virtual/test_oo_lang.rb