1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
|
require_relative 'buffered_shared'
module Concurrent::Channel::Buffer
RSpec.describe Base, edge: true, notravis: true do
subject { described_class.new }
specify do
expect(subject.capacity).to eq 0
end
specify do
expect(subject).to be_blocking
end
specify do
expect {
subject.size
}.to raise_error(NotImplementedError)
end
specify do
expect {
subject.empty?
}.to raise_error(NotImplementedError)
end
specify do
expect {
subject.full?
}.to raise_error(NotImplementedError)
end
specify do
expect {
subject.put(42)
}.to raise_error(NotImplementedError)
end
specify do
expect {
subject.offer(42)
}.to raise_error(NotImplementedError)
end
specify do
expect {
subject.take
}.to raise_error(NotImplementedError)
end
specify do
expect {
subject.poll
}.to raise_error(NotImplementedError)
end
specify do
expect {
subject.next
}.to raise_error(NotImplementedError)
end
specify do
expect(subject).to_not be_closed
end
specify do
subject.close
expect(subject).to be_closed
end
end
end
|