lib/ggem/template_file/test_helper.rb.erb in ggem-1.8.0 vs lib/ggem/template_file/test_helper.rb.erb in ggem-1.8.1
- old
+ new
@@ -7,6 +7,15 @@
# 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
+
# TODO: put test helpers here...