Sha256: ea268edc85607b312d0116ba8d295be13d6018400115cc64db66f6362aeb83c5

Contents?: true

Size: 576 Bytes

Versions: 3

Compression:

Stored size: 576 Bytes

Contents

require 'spec_helper'

describe AQL::Node::Literal::Composed::Document, '.construct' do
  let(:object) { described_class }
  let(:subject) { object.construct(input) }

  context 'without attributes' do
    let(:input) { {} }

    it { should eql(described_class.new([])) }
  end

  context 'with attributes' do
    let(:input) { { 1 => 2 } }

    let(:attribute) do 
      AQL::Node::Literal::Composed::Document::Attribute.new(
        AQL::Node::Literal.build(1), AQL::Node::Literal.build(2)
      )
    end

    it { should eql(described_class.new([attribute])) }
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
aql-0.0.3 spec/unit/aql/node/literal/composed/document/class_methods/construct_spec.rb
aql-0.0.2 spec/unit/aql/node/literal/composed/document/class_methods/construct_spec.rb
aql-0.0.1 spec/unit/aql/node/literal/composed/document/class_methods/construct_spec.rb