test/helper.rb in deas-erubis-0.5.2 vs test/helper.rb in deas-erubis-0.5.3
- old
+ new
@@ -13,5 +13,14 @@
# require pry for debugging (`binding.pry`)
require 'pry'
require 'test/support/factory'
+
+# 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