Sha256: f7c517c59aaca4af05f4b71855e67882f490b5720dfab17da596908e853bf984

Contents?: true

Size: 817 Bytes

Versions: 3

Compression:

Stored size: 817 Bytes

Contents

require 'spec_helper'
module Exlibris
  module Aleph
    class Item
      describe Queue do
        let(:value) { "1 request(s) of 1 items." }
        subject(:queue) { Queue.new(value) }
        describe '#value' do
          subject { queue.value }
          it { should eq value }
        end
        describe '#to_s' do
          subject { queue.to_s }
          it { should eq value }
        end
        describe '#number_of_requests' do
          subject { queue.number_of_requests }
          it { should eq 1 }
          context 'when the input value is nil' do
            let(:value) { nil }
            it { should eq 0 }
          end
          context 'when the input value is blank' do
            let(:value) { '' }
            it { should eq 0 }
          end
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
exlibris-aleph-2.0.4 spec/exlibris/aleph/item/queue_spec.rb
exlibris-aleph-2.0.3 spec/exlibris/aleph/item/queue_spec.rb
exlibris-aleph-2.0.0 spec/exlibris/aleph/item/queue_spec.rb