Sha256: bde91e8e29a4fefba3a912607e7d3a9c6cf39fe15219a5c94d13c4fe60b10b38

Contents?: true

Size: 608 Bytes

Versions: 1

Compression:

Stored size: 608 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Relation, '#materialize' do
  subject { object.materialize }

  let(:header) { Relation::Header.coerce([[:id, Integer]])                                   }
  let(:object) { described_class.new(header, LazyEnumerable.new([[1]])).sort_by { |r| r.id } }

  before do
    object.should be_kind_of(described_class)
  end

  it { should be_instance_of(Relation::Materialized) }

  its(:header) { should be(header) }

  its(:directions) { should == header }

  it 'returns an equivalent relation to the unmaterialized operation' do
    should == object
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

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