Sha256: e17200639f885a6fa3c6a3a80a99a3e5db8316537f95db9131493183ab909203

Contents?: true

Size: 518 Bytes

Versions: 12

Compression:

Stored size: 518 Bytes

Contents

require "spec_helper"

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

  ["a or b", "a and b", "a or b or c", "a and b and c"].each do |input|
    context input do
      let!(:input) { input }

      it { subject }
    end
  end

  [
    "a /* cool */ and b",
    "a and /* cool */ b",
    "a or b or c /* cool */",
    "a or b or /* cool */ c"
  ].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/or_keyword_spec.rb
code-ruby-parser-0.1.8 spec/code/parser/or_keyword_spec.rb
template-ruby-parser-0.1.7 spec/code/parser/or_keyword_spec.rb
code-ruby-parser-0.1.7 spec/code/parser/or_keyword_spec.rb
template-ruby-parser-0.1.6 spec/code/parser/or_keyword_spec.rb
code-ruby-parser-0.1.6 spec/code/parser/or_keyword_spec.rb
template-ruby-parser-0.1.5 spec/code/parser/or_keyword_spec.rb
code-ruby-parser-0.1.5 spec/code/parser/or_keyword_spec.rb
template-ruby-parser-0.1.4 spec/code/parser/or_keyword_spec.rb
code-ruby-parser-0.1.4 spec/code/parser/or_keyword_spec.rb
template-ruby-parser-0.1.3 spec/code/parser/or_keyword_spec.rb
code-ruby-parser-0.1.3 spec/code/parser/or_keyword_spec.rb