Sha256: a5dec23d8eb06b45de7501d95945171a686c63bdd3a844fd1449a6b5be157aaa

Contents?: true

Size: 599 Bytes

Versions: 1

Compression:

Stored size: 599 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Relation::Empty, '.new' do
  let(:object) { described_class      }
  let(:header) { [ [ :id, Integer ] ] }

  context 'with a header' do
    subject { object.new(header) }

    it { should be_instance_of(object) }

    its(:header){ should == header }

    its(:tuples) { should == [] }
  end

  context 'with a header and tuples' do
    subject { object.new(header, tuples) }

    let(:tuples) { [ mock('Tuple') ] }

    it { should be_instance_of(object) }

    its(:header){ should == header }

    its(:tuples) { should eql(tuples) }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
axiom-0.1.0 spec/unit/axiom/relation/empty/class_methods/new_spec.rb