Sha256: 50c649fa1c17a7a39971084b62b1464e0b89f8da0617212d6e3c76e2b8c95d3e

Contents?: true

Size: 445 Bytes

Versions: 3

Compression:

Stored size: 445 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Relation::Materialized, '#empty?' do
  subject { object.empty? }

  let(:header) { [ [ :id, Integer ] ]              }
  let(:object) { described_class.new(header, body) }

  context 'with a body containing no entries' do
    let(:body) { [] }

    it { should be(true) }
  end

  context 'with a body containing an entry' do
    let(:body) { [ [ 1 ] ] }

    it { should be(false) }
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
axiom-0.1.0 spec/unit/axiom/relation/materialized/empty_predicate_spec.rb
veritas-0.0.7 spec/unit/veritas/relation/materialized/empty_spec.rb
veritas-0.0.6 spec/unit/veritas/relation/materialized/empty_spec.rb