diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-10-12 14:43:01 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-10-12 14:43:01 -0300 |
commit | a284b145dab008b097eb1046fd86aa9e6469fc25 (patch) | |
tree | cfa5b11d1343e869df3b8b93b668537f535e1f50 /railties | |
parent | 08f57bfb8f46e9f521b7d324fc47fe00d93f42bf (diff) | |
download | rails-a284b145dab008b097eb1046fd86aa9e6469fc25.tar.gz rails-a284b145dab008b097eb1046fd86aa9e6469fc25.tar.bz2 rails-a284b145dab008b097eb1046fd86aa9e6469fc25.zip |
ActiveSupport::SynchronousQueue doesn't have the drain method.
Now we are using teh SynchronousQueue in the test environment instead of
the TestQueue
Diffstat (limited to 'railties')
-rw-r--r-- | railties/test/application/queue_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/railties/test/application/queue_test.rb b/railties/test/application/queue_test.rb index 58173afc69..7d8f665024 100644 --- a/railties/test/application/queue_test.rb +++ b/railties/test/application/queue_test.rb @@ -58,12 +58,12 @@ module ApplicationTests refute job.ran_in_different_thread?, "Expected job to run in the same thread" end - test "in test mode, explicitly draining the queue will process it in the same thread" do + test "in test mode, an enqueued job will be processed in the same thread" do app("test") - Rails.queue.push ThreadTrackingJob.new - job = Rails.queue.jobs.last - Rails.queue.drain + job = ThreadTrackingJob.new + Rails.queue.push job + sleep 0.1 assert job.ran?, "Expected job to be run" refute job.ran_in_different_thread?, "Expected job to run in the same thread" |