Sha256: f12085fe152dc7e62b83463f3d87e1ed5f281460b397e2c1134edb6dce012df9
Contents?: true
Size: 865 Bytes
Versions: 7
Compression:
Stored size: 865 Bytes
Contents
require "spec_helper" require "expressir/express_exp/parser" RSpec.describe Expressir::Model::Scope do describe ".find" do it "finds an item" do repo = Expressir::ExpressExp::Parser.from_exp(sample_file) schema = repo.find("syntax_schema") expect(schema).to be_instance_of(Expressir::Model::Schema) entity = repo.find("syntax_schema.empty_entity") expect(entity).to be_instance_of(Expressir::Model::Entity) attribute = repo.find("syntax_schema.attribute_entity.test") expect(attribute).to be_instance_of(Expressir::Model::Attribute) where = repo.find("syntax_schema.where_label_entity.wr:WR1") expect(where).to be_instance_of(Expressir::Model::Where) end end def sample_file @sample_file ||= Expressir.root_path.join( "original", "examples", "syntax", "syntax.exp" ) end end
Version data entries
7 entries across 7 versions & 1 rubygems