test/helper.rb in sanford-0.17.0 vs test/helper.rb in sanford-0.18.0
- old
+ new
@@ -10,5 +10,16 @@
require 'pathname'
ROOT_PATH = Pathname.new(File.expand_path('../..', __FILE__))
require 'test/support/factory'
+
+JOIN_SECONDS = 0.1
+
+# 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