aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/library/thread/shared/queue/enque.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/thread/shared/queue/enque.rb')
-rw-r--r--spec/ruby/library/thread/shared/queue/enque.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/ruby/library/thread/shared/queue/enque.rb b/spec/ruby/library/thread/shared/queue/enque.rb
new file mode 100644
index 0000000000..36b98d3a07
--- /dev/null
+++ b/spec/ruby/library/thread/shared/queue/enque.rb
@@ -0,0 +1,10 @@
+describe :queue_enq, shared: true do
+ it "adds an element to the Queue" do
+ q = @object.call
+ q.size.should == 0
+ q.send(@method, Object.new)
+ q.size.should == 1
+ q.send(@method, Object.new)
+ q.size.should == 2
+ end
+end