Permalink
Browse files

Use Actor.all in pool spec

  • Loading branch information...
1 parent 0d9cc87 commit 16440e738ba884942e99d0de6e07513dd7883233 @tarcieri tarcieri committed Jul 14, 2012
Showing with 6 additions and 5 deletions.
  1. +6 −5 spec/celluloid/pool_spec.rb
@@ -39,11 +39,12 @@ def crash
end
it "uses a fixed-sized number of threads" do
- # Eagerly evaluate subject to spawn the pool
- subject
+ pool = MyWorker.pool
- thread_count = Thread.list.size
- 100.times.map { subject.future(:process) }.map(&:value)
- Thread.list.size.should == thread_count
+ actors = Celluloid::Actor.all
+ 100.times.map { pool.future(:process) }.map(&:value)
+
+ new_actors = Celluloid::Actor.all - actors
+ new_actors.should eq []
end
end

0 comments on commit 16440e7

Please sign in to comment.