Sha256: 4c388615b6e0478d47f54126778d4f880aa62fd99e590a95e7eee6ca3dd03e2d

Contents?: true

Size: 545 Bytes

Versions: 6

Compression:

Stored size: 545 Bytes

Contents

require "spec_helper"

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

  ["a == b", "a != b", "a > 1 == true", "a == b == c"].each do |input|
    context input do
      let!(:input) { input }

      it { expect { subject }.to_not raise_error }
    end
  end

  [
    "a /* cool */ == b",
    "a == /* cool */ b",
    "a == b /* cool */ == c",
    "a == b == /* 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

6 entries across 6 versions & 2 rubygems

Version Path
template-ruby-parser-0.1.2 spec/code/parser/equality_spec.rb
code-ruby-parser-0.1.2 spec/code/parser/equality_spec.rb
template-ruby-parser-0.1.1 spec/code/parser/equality_spec.rb
code-ruby-parser-0.1.1 spec/code/parser/equality_spec.rb
template-ruby-parser-0.1.0 spec/code/parser/equality_spec.rb
code-ruby-parser-0.1.0 spec/code/parser/equality_spec.rb