Sha256: 65582fe7d12e97fd62e0a0d45a16f05bf0c1f30389d2096b524b84dd5d0fae22

Contents?: true

Size: 653 Bytes

Versions: 3

Compression:

Stored size: 653 Bytes

Contents

require 'spec_helper'

describe AQL::Node::Literal::Composed::List, '#aql' do
  let(:object) { AQL::Node::Literal.build(input) }

  examples = {
    []                                        => '[]',
    [1, 2, 3]                                 => '[1, 2, 3]',
    [-99, "yikes!", [ true, [ "no"], []], 1 ] => '[-99, "yikes!", [true, ["no"], []], 1]',
    [["fox", "marshal"]]                      => '[["fox", "marshal"]]',
    [nil]                                     => '[null]'
  }

  examples.each do |input, expectation|
    context "with #{input.inspect} as input" do
      let(:input) { input }
      expect_aql(expectation)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
aql-0.0.3 spec/unit/aql/node/literal/composed/list/aql_spec.rb
aql-0.0.2 spec/unit/aql/node/literal/composed/list/aql_spec.rb
aql-0.0.1 spec/unit/aql/node/literal/composed/list/aql_spec.rb