summaryrefslogtreecommitdiff
path: root/test/json/test_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/json/test_helper.rb')
-rw-r--r--test/json/test_helper.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/json/test_helper.rb b/test/json/test_helper.rb
new file mode 100644
index 00000000000..69edb627e8c
--- /dev/null
+++ b/test/json/test_helper.rb
@@ -0,0 +1,22 @@
+# frozen_string_literal: false
+case ENV['JSON']
+when 'pure'
+ $:.unshift 'lib'
+ require 'json/pure'
+when 'ext'
+ $:.unshift 'ext', 'lib'
+ require 'json/ext'
+else
+ $:.unshift 'ext', 'lib'
+ require 'json'
+end
+
+require 'test/unit'
+begin
+ require 'byebug'
+rescue LoadError
+end
+if ENV['START_SIMPLECOV'].to_i == 1
+ require 'simplecov'
+ SimpleCov.start
+end