Sha256: fe942d7643c3e790e28b4f9711cfa84870641059035dcd23c94f7017ccbb9630

Contents?: true

Size: 513 Bytes

Versions: 12

Compression:

Stored size: 513 Bytes

Contents

require "spec_helper"

RSpec.describe ::Code::Parser do
  subject { ::Code::Parser.parse(input) }

  ["[]", "[1]", "[1,2]", "[1,[true]]"].each do |input|
    context input do
      let!(:input) { input }

      it { subject }
    end
  end

  [
    "[ /* cool */ ]",
    "[ /* cool */ 1 ]",
    "[ 1 /* cool */ ]",
    "[ 1, /* cool */ 2 ]",
    "[ 1, 2 /* cool */ ]"
  ].each do |input|
    context input do
      let!(:input) { input }

      it { expect(subject.to_json).to include("cool") }
    end
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
template-ruby-parser-0.1.8 spec/code/parser/list_spec.rb
code-ruby-parser-0.1.8 spec/code/parser/list_spec.rb
template-ruby-parser-0.1.7 spec/code/parser/list_spec.rb
code-ruby-parser-0.1.7 spec/code/parser/list_spec.rb
template-ruby-parser-0.1.6 spec/code/parser/list_spec.rb
code-ruby-parser-0.1.6 spec/code/parser/list_spec.rb
template-ruby-parser-0.1.5 spec/code/parser/list_spec.rb
code-ruby-parser-0.1.5 spec/code/parser/list_spec.rb
template-ruby-parser-0.1.4 spec/code/parser/list_spec.rb
code-ruby-parser-0.1.4 spec/code/parser/list_spec.rb
template-ruby-parser-0.1.3 spec/code/parser/list_spec.rb
code-ruby-parser-0.1.3 spec/code/parser/list_spec.rb