test/helper.rb in osheet-xmlss-1.0.0 vs test/helper.rb in osheet-xmlss-1.0.1
- old
+ new
@@ -5,10 +5,11 @@
$LOAD_PATH.unshift(File.expand_path("../..", __FILE__))
# require pry for debugging (`binding.pry`)
require 'pry'
+require 'test/support/factory'
require 'xmlss/workbook'
class Assert::Context
def xmlss_style_markup(writer)
@@ -17,6 +18,15 @@
def xmlss_element_markup(writer)
Xmlss::Workbook.writer(writer.xmlss_workbook).worksheets_markup.flush.to_s
end
+end
+
+# 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