Learn more  » Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

vistahigherlearning / common_cartridge   ruby

Repository URL to install this package:

Version: 1.0.1 

/ spec / elements / metadata_spec.rb

require 'spec_helper'

module CommonCartridge
  module Elements
    describe Metadata do
      context "Common Cartridge 1.1" do
        before(:all) { @metadata = CommonCartridge.parse_from_zip("canvas_small_1.1.imscc").manifest.metadata }

        it "has a schema" do
          expect(@metadata.schema).to eq("IMS Common Cartridge")
        end

        it "has a schemaversion" do
          expect(@metadata.schemaversion).to eq("1.1.0")
        end

        it "has a lom" do
          expect(@metadata.lom).to be_kind_of(CommonCartridge::Elements::Lom::Lom)
        end
      end

      context "Common Cartridge 1.3" do
        before(:all) { @metadata = CommonCartridge.parse_from_zip("canvas_large_1.3.imscc").manifest.metadata }

        it "has a schema" do
          expect(@metadata.schema).to eq("IMS Common Cartridge")
        end

        it "has a schemaversion" do
          expect(@metadata.schemaversion).to eq("1.3.0")
        end

        it "has a lom" do
          expect(@metadata.lom).to be_kind_of(CommonCartridge::Elements::Lom::Lom)
        end
      end
    end
  end
end