test/helper.rb in ardb-0.27.3 vs test/helper.rb in ardb-0.28.0
- old
+ new
@@ -2,12 +2,24 @@
# put any test helpers here
# add the root dir to the load path
$LOAD_PATH.unshift(File.expand_path("../..", __FILE__))
+TEST_SUPPORT_PATH = File.expand_path("../support", __FILE__)
+TMP_PATH = File.expand_path("../../tmp", __FILE__)
+
+require 'logger'
+log_path = File.expand_path("../../log/test.log", __FILE__)
+TEST_LOGGER = Logger.new(File.open(log_path, 'w'))
+
# require pry for debugging (`binding.pry`)
require 'pry'
require 'test/support/factory'
-ENV['ARDB_DB_FILE'] = 'tmp/testdb/config/db'
-require 'ardb'
-Ardb.init(false)
+# 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