Sha256: c3878c012aaded5935815f2ffb36f65f631745036e82250753e22a12dd453a9b
Contents?: true
Size: 921 Bytes
Versions: 1
Compression:
Stored size: 921 Bytes
Contents
require 'spec_helper' describe ActiveFedora::Noid do describe '#configure' do it { is_expected.to respond_to(:configure) } end describe '#config' do it 'returns a config object' do expect(subject.config).to be_instance_of ActiveFedora::Noid::Config end end describe '#treeify' do subject { ActiveFedora::Noid.treeify(id) } let(:id) { 'abc123def45' } it { is_expected.to eq 'ab/c1/23/de/abc123def45' } context 'with a seven-digit identifier' do let(:id) { 'abc123z' } it { is_expected.to eq 'ab/c1/23/z/abc123z' } end context 'with an empty string' do let(:id) { '' } it 'raises ArgumentError' do expect { subject }.to raise_error(ArgumentError) end end context 'with a nil' do let(:id) { nil } it 'raises ArgumentError' do expect { subject }.to raise_error(ArgumentError) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
active_fedora-noid-1.1.3 | spec/unit/noid_spec.rb |