summaryrefslogtreecommitdiff
path: root/spec/rubyspec/library/thread/shared/queue/length.rb
blob: a0143a4e191b49cdf247946f33fc57cdfb75cdc4 (plain)
1
2
3
4
5
6
7
8
9
describe :queue_length, shared: true do
  it "returns the number of elements" do
    q = @object.call
    q.send(@method).should == 0
    q << Object.new
    q << Object.new
    q.send(@method).should == 2
  end
end