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.16-x86-linux spec/expressir/express/repository_spec.rb
expressir-0.2.16-x64-mingw32 spec/expressir/express/repository_spec.rb
expressir-0.2.16-arm64-darwin spec/expressir/express/repository_spec.rb
expressir-0.2.15 spec/expressir/express/repository_spec.rb
expressir-0.2.15-x86_64-linux spec/expressir/express/repository_spec.rb
expressir-0.2.15-x86_64-darwin spec/expressir/express/repository_spec.rb
expressir-0.2.15-x86-mingw32 spec/expressir/express/repository_spec.rb
expressir-0.2.15-x86-linux spec/expressir/express/repository_spec.rb
expressir-0.2.15-x64-mingw32 spec/expressir/express/repository_spec.rb
expressir-0.2.15-arm64-darwin spec/expressir/express/repository_spec.rb
expressir-0.2.14 spec/expressir/express/repository_spec.rb
expressir-0.2.14-x86_64-linux spec/expressir/express/repository_spec.rb
expressir-0.2.14-x86_64-darwin spec/expressir/express/repository_spec.rb
expressir-0.2.14-x86-mingw32 spec/expressir/express/repository_spec.rb
expressir-0.2.14-x86-linux spec/expressir/express/repository_spec.rb
expressir-0.2.14-x64-mingw32 spec/expressir/express/repository_spec.rb
expressir-0.2.14-arm64-darwin spec/expressir/express/repository_spec.rb
expressir-0.2.13 spec/expressir/express/repository_spec.rb
expressir-0.2.13-x86_64-linux spec/expressir/express/repository_spec.rb
expressir-0.2.13-x86_64-darwin spec/expressir/express/repository_spec.rb