Sha256: 36ff53c40a38e008d7213b12c6931015e9d2cb5e502d56a8cdba28e519c848bc

Contents?: true

Size: 532 Bytes

Versions: 1

Compression:

Stored size: 532 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

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

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

  before do
    object.should be_instance_of(described_class)
  end

  context 'with a body containing no entries' do
    let(:body) { LazyEnumerable.new }

    it { should be(true) }
  end

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

    it { should be(false) }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
axiom-0.1.1 spec/unit/axiom/relation/empty_predicate_spec.rb