Sha256: 24c72ed441ef7ed77860961be4f9bd6ac355e786f7246b3248ecbf2453ad77a8

Contents?: true

Size: 747 Bytes

Versions: 135

Compression:

Stored size: 747 Bytes

Contents

require "spec_helper"

RSpec.describe Expressir::Express::Repository do
  describe ".from_file" do
    it "build an instance from a file" do
      name = "Ap233_systems_engineering_arm_LF"

      repo = Expressir::Express::Repository.from_xml(sample_file)
      schema = repo.schemas.first

      expect(repo.name).to eq(name)
      expect(repo.schemas.count).to eq(1)
      expect(schema.name).to eq(name)
      expect(schema.contents.count).to eq(795)
      expect(schema.contents.first.schema).to eq(name)
      expect(schema.contents.first.name).to eq("Abs_function")
    end
  end

  def sample_file
    @sample_file ||= Expressir.root_path.join(
      "original", "examples", "ap233", "ap233e1_arm_lf_stepmod-2010-11-12.xml"
    )
  end
end

Version data entries

135 entries across 135 versions & 1 rubygems

Version Path
expressir-0.2.7-x86-mingw32 spec/expressir/express/repository_spec.rb
expressir-0.2.7-x64-mingw32 spec/expressir/express/repository_spec.rb
expressir-0.2.7-x86_64-linux spec/expressir/express/repository_spec.rb
expressir-0.2.7-x86-linux spec/expressir/express/repository_spec.rb
expressir-0.2.7-x86_64-darwin spec/expressir/express/repository_spec.rb
expressir-0.2.7-arm64-darwin spec/expressir/express/repository_spec.rb
expressir-0.2.5-x86_64-linux spec/expressir/express/repository_spec.rb
expressir-0.2.5-x86_64-darwin-19 spec/expressir/express/repository_spec.rb
expressir-0.2.5 spec/expressir/express/repository_spec.rb
expressir-0.2.4 spec/expressir/express/repository_spec.rb
expressir-0.2.3 spec/expressir/express/repository_spec.rb
expressir-0.2.2 spec/expressir/express/repository_spec.rb
expressir-0.2.1 spec/expressir/express/repository_spec.rb
expressir-0.2.0 spec/expressir/express/repository_spec.rb
expressir-0.1.0 spec/expressir/express/repository_spec.rb