Sha256: d0f80785ea62af01777a7bda89d6d1d9be19c4cb6223128cc7d18c876d780808

Contents?: true

Size: 496 Bytes

Versions: 4

Compression:

Stored size: 496 Bytes

Contents

require 'test_helpers'
describe Alf, "query" do

  subject{ Alf.query(adapter){ suppliers } }

  it{ should be_a(Relation) }

  it 'should have expected heading' do
    subject.heading.should eq(Heading(sid: String, name: String, status: Integer, city: String))
  end

  it 'should have all tuples of exact same class' do
    clazz = nil
    subject.each do |tuple|
      clazz ||= tuple.class
      tuple.class.object_id.should eq(clazz.object_id)
    end
    clazz.should_not be_nil
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
alf-0.16.3 spec/facade/test_query.rb
alf-0.16.2 spec/facade/test_query.rb
alf-0.16.1 spec/facade/test_query.rb
alf-0.16.0 spec/facade/test_query.rb