Sha256: 3c4cd4f9fa3ba02cddcd8978cbad1152df7983d2f3763f001a0a235f54d555c6

Contents?: true

Size: 574 Bytes

Versions: 12

Compression:

Stored size: 574 Bytes

Contents

require "spec_helper"

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

  [
    "class A",
    "class A self.b = 1",
    "class A < B",
    "class A end",
    "class A self.b = 1 end",
    "class A < B end"
  ].each do |input|
    context input do
      let!(:input) { input }

      it { subject }
    end
  end

  [
    "class /* cool */ A",
    "class A /* cool */ < B",
    "class A </* cool */ B"
  ].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/class_spec.rb
code-ruby-parser-0.1.8 spec/code/parser/class_spec.rb
template-ruby-parser-0.1.7 spec/code/parser/class_spec.rb
code-ruby-parser-0.1.7 spec/code/parser/class_spec.rb
template-ruby-parser-0.1.6 spec/code/parser/class_spec.rb
code-ruby-parser-0.1.6 spec/code/parser/class_spec.rb
template-ruby-parser-0.1.5 spec/code/parser/class_spec.rb
code-ruby-parser-0.1.5 spec/code/parser/class_spec.rb
template-ruby-parser-0.1.4 spec/code/parser/class_spec.rb
code-ruby-parser-0.1.4 spec/code/parser/class_spec.rb
template-ruby-parser-0.1.3 spec/code/parser/class_spec.rb
code-ruby-parser-0.1.3 spec/code/parser/class_spec.rb