aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/queueing
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2012-04-27 13:51:54 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2012-04-27 13:51:54 -0700
commit673fe05899706e2e4eef28b6f749eab1b3df5d82 (patch)
treedd3b89ea719d671d0fe56066299ef8f89c63569e /railties/test/queueing
parent3ca7b137fbc7001a9b3384d2a44132913a93bb4b (diff)
downloadrails-673fe05899706e2e4eef28b6f749eab1b3df5d82.tar.gz
rails-673fe05899706e2e4eef28b6f749eab1b3df5d82.tar.bz2
rails-673fe05899706e2e4eef28b6f749eab1b3df5d82.zip
do not depend on time
Diffstat (limited to 'railties/test/queueing')
-rw-r--r--railties/test/queueing/test_queue_test.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/railties/test/queueing/test_queue_test.rb b/railties/test/queueing/test_queue_test.rb
index 3dfe586110..466af22351 100644
--- a/railties/test/queueing/test_queue_test.rb
+++ b/railties/test/queueing/test_queue_test.rb
@@ -26,16 +26,16 @@ class TestQueueTest < ActiveSupport::TestCase
end
def test_order
- time1 = time2 = nil
+ processed = []
- job1 = Job.new(1) { time1 = Time.now }
- job2 = Job.new(2) { time2 = Time.now }
+ job1 = Job.new(1) { processed << 1 }
+ job2 = Job.new(2) { processed << 2 }
@queue.push job1
@queue.push job2
@queue.drain
- assert time1 < time2, "Jobs run in the same order they were added"
+ assert_equal [1,2], processed
end
def test_drain