test/helper.rb in dat-worker-pool-0.6.0 vs test/helper.rb in dat-worker-pool-0.6.1
- old
+ new
@@ -18,6 +18,13 @@
JOIN_SECONDS = 0.001
require 'test/support/factory'
-# TODO: put test helpers here...
+# 1.8.7 backfills
+
+# Array#sample
+if !(a = Array.new).respond_to?(:sample) && a.respond_to?(:choice)
+ class Array
+ alias_method :sample, :choice
+ end
+end