Sha256: 8bc4c54f9297b764efd8d16af089d2a176124c8d42ad4b7cf05e4cba5116cbcc
Contents?: true
Size: 1.19 KB
Versions: 21
Compression:
Stored size: 1.19 KB
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].file).to eq(sample_files[0]) expect(schemas[0].id).to eq("syntax_schema") expect(schemas[1].file).to eq(sample_files[1]) expect(schemas[1].id).to eq("remark_schema") expect(schemas[2].file).to eq(sample_files[2]) expect(schemas[2].id).to eq("entity_schema") expect(schemas[3].file).to eq(sample_files[2]) expect(schemas[3].id).to eq("version_entity_schema") expect(schemas[4].file).to eq(sample_files[2]) 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
21 entries across 21 versions & 1 rubygems