Sha256: 5ca4b44afe6307c4572fd729f38735f77f0d44d21fd78d86fa41f8d2f2f68910

Contents?: true

Size: 643 Bytes

Versions: 4

Compression:

Stored size: 643 Bytes

Contents

require 'test_helpers'
module Alf
  module Algebra
    describe Image do

      context 'on sap' do

        subject{
          db.connect do |c|
            c.query{ image(suppliers, supplies, :supplying) }
          end
        }

        it{ should be_a(Relation) }

        it 'should have all suppliers' do
          subject.size.should eq(5)
        end

        it 'should have the supplying attr' do
          subject.each do |tuple|
            tuple.supplying.should be_a(Relation)
            if tuple.sid == 'S5'
              tuple.supplying.should be_empty
            end
          end
        end

      end

    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
alf-0.16.3 spec/operators/test_image.rb
alf-0.16.2 spec/operators/test_image.rb
alf-0.16.1 spec/operators/test_image.rb
alf-0.16.0 spec/operators/test_image.rb