Sha256: 34121adb8220687d2fe0ebc10b53bd4087efb52201e1b1d84b01737ea1262e11

Contents?: true

Size: 1.29 KB

Versions: 18

Compression:

Stored size: 1.29 KB

Contents

require 'spec_helper'

describe Hydra::PCDM do
  let(:coll1)  { Hydra::PCDM::Collection.create }
  let(:obj1)   { Hydra::PCDM::Object.create }
  let(:file1)  { Hydra::PCDM::File.new }

  describe 'Validations' do
    describe '#collection?' do
      it 'return true for a pcdm collection' do
        expect(described_class).to be_collection coll1
      end

      it 'return false for a pcdm object' do
        expect(described_class).not_to be_collection obj1
      end

      it 'return false for a pcdm file' do
        expect(described_class).not_to be_collection file1
      end
    end

    describe '#object?' do
      it 'return false for a pcdm collection' do
        expect(described_class).not_to be_object coll1
      end

      it 'return true for a pcdm object' do
        expect(described_class).to be_object obj1
      end

      it 'return false for a pcdm file' do
        expect(described_class).not_to be_object file1
      end
    end

    describe '#file?' do
      it 'return false for a pcdm collection' do
        expect(described_class).not_to be_file coll1
      end

      it 'return false for a pcdm object' do
        expect(described_class).not_to be_file obj1
      end

      it 'return true for a pcdm file' do
        expect(described_class).to be_file file1
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
hydra-pcdm-1.4.0 spec/hydra/pcdm_spec.rb
hydra-pcdm-1.3.0 spec/hydra/pcdm_spec.rb
hydra-pcdm-1.2.0 spec/hydra/pcdm_spec.rb
hydra-pcdm-1.1.0 spec/hydra/pcdm_spec.rb
hydra-pcdm-1.0.1 spec/hydra/pcdm_spec.rb
hydra-pcdm-1.0.0 spec/hydra/pcdm_spec.rb
hydra-pcdm-0.11.0 spec/hydra/pcdm_spec.rb
hydra-pcdm-0.10.0 spec/hydra/pcdm_spec.rb
hydra-pcdm-0.9.0 spec/hydra/pcdm_spec.rb
hydra-pcdm-0.8.2 spec/hydra/pcdm_spec.rb
hydra-pcdm-0.8.1 spec/hydra/pcdm_spec.rb
hydra-pcdm-0.8.0 spec/hydra/pcdm_spec.rb
hydra-pcdm-0.8.0.beta1 spec/hydra/pcdm_spec.rb
hydra-pcdm-0.7.0 spec/hydra/pcdm_spec.rb
hydra-pcdm-0.6.0 spec/hydra/pcdm_spec.rb
hydra-pcdm-0.5.0 spec/hydra/pcdm_spec.rb
hydra-pcdm-0.4.0 spec/hydra/pcdm_spec.rb
hydra-pcdm-0.3.2 spec/hydra/pcdm_spec.rb