test/helper.rb in dk-0.0.1 vs test/helper.rb in dk-0.1.0
- old
+ new
@@ -1,14 +1,19 @@
# this file is automatically required when you run `assert`
# put any test helpers here
# add the root dir to the load path
-$LOAD_PATH.unshift(File.expand_path("../..", __FILE__))
+require 'pathname'
+ROOT_PATH = Pathname.new(File.expand_path("../..", __FILE__))
+$LOAD_PATH.unshift(ROOT_PATH)
# require pry for debugging (`binding.pry`)
require 'pry'
require 'test/support/factory'
+
+# put scmd in test mode
+ENV['SCMD_TEST_MODE'] = '1'
# 1.8.7 backfills
# Array#sample
if !(a = Array.new).respond_to?(:sample) && a.respond_to?(:choice)