Sha256: c7dccebb35aee3e5927db6919dac11174a3987a187730795685343e2d7394acd

Contents?: true

Size: 949 Bytes

Versions: 14

Compression:

Stored size: 949 Bytes

Contents

require "spec_helper"
require "expressir/express_exp/parser"

RSpec.describe Expressir::ExpressExp::Parser do
  describe ".from_files" do
    it "parses multiple files" do
      repo = Expressir::ExpressExp::Parser.from_files(sample_files)

      schemas = repo.schemas
      expect(schemas.count).to eq(5)
      expect(schemas[0].id).to eq("syntax_schema")
      expect(schemas[1].id).to eq("remark_schema")
      expect(schemas[2].id).to eq("entity_schema")
      expect(schemas[3].id).to eq("version_entity_schema")
      expect(schemas[4].id).to eq("version_interface_entity_schema")
    end
  end

  def sample_files
    @sample_files ||= [
      Expressir.root_path.join(
        "original", "examples", "syntax", "syntax.exp"
      ),
      Expressir.root_path.join(
        "original", "examples", "syntax", "remark.exp"
      ),
      Expressir.root_path.join(
        "original", "examples", "syntax", "source.exp"
      )
    ]
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
expressir-0.2.13 spec/expressir/express_exp/parser/multiple_spec.rb
expressir-0.2.13-x86_64-linux spec/expressir/express_exp/parser/multiple_spec.rb
expressir-0.2.13-x86_64-darwin spec/expressir/express_exp/parser/multiple_spec.rb
expressir-0.2.13-x86-mingw32 spec/expressir/express_exp/parser/multiple_spec.rb
expressir-0.2.13-x86-linux spec/expressir/express_exp/parser/multiple_spec.rb
expressir-0.2.13-x64-mingw32 spec/expressir/express_exp/parser/multiple_spec.rb
expressir-0.2.13-arm64-darwin spec/expressir/express_exp/parser/multiple_spec.rb
expressir-0.2.12 spec/expressir/express_exp/parser/multiple_spec.rb
expressir-0.2.12-x86_64-linux spec/expressir/express_exp/parser/multiple_spec.rb
expressir-0.2.12-x86_64-darwin spec/expressir/express_exp/parser/multiple_spec.rb
expressir-0.2.12-x86-mingw32 spec/expressir/express_exp/parser/multiple_spec.rb
expressir-0.2.12-x86-linux spec/expressir/express_exp/parser/multiple_spec.rb
expressir-0.2.12-x64-mingw32 spec/expressir/express_exp/parser/multiple_spec.rb
expressir-0.2.12-arm64-darwin spec/expressir/express_exp/parser/multiple_spec.rb