test/helper.rb in dassets-0.13.2 vs test/helper.rb in dassets-0.14.0
- old
+ new
@@ -7,9 +7,18 @@
# 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
+
require 'pathname'
TEST_SUPPORT_PATH = Pathname.new(File.expand_path('../support', __FILE__))
ENV['DASSETS_TEST_MODE'] = 'yes'