aboutsummaryrefslogtreecommitdiffstats
path: root/test/reline
diff options
context:
space:
mode:
authormanga_osyo <manga.osyo@gmail.com>2019-07-15 03:10:26 +0900
committeraycabta <aycabta@gmail.com>2019-08-27 01:23:19 +0900
commit298ac047102f8651970b50a0096989a0b7df88ca (patch)
tree74f2dbf6fd3a4113b4961a09cfc4c27125591e60 /test/reline
parentafed2668a6f6675536e967f053d7dec0b2026e2f (diff)
downloadruby-298ac047102f8651970b50a0096989a0b7df88ca.tar.gz
Refactoring Reline.
Diffstat (limited to 'test/reline')
-rw-r--r--test/reline/helper.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/reline/helper.rb b/test/reline/helper.rb
index 3cec45b94d..ca0001258d 100644
--- a/test/reline/helper.rb
+++ b/test/reline/helper.rb
@@ -1,6 +1,5 @@
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
require 'reline'
-require 'reline2'
require 'test/unit'
module Reline
@@ -8,8 +7,12 @@ module Reline
def test_mode
remove_const('IOGate') if const_defined?('IOGate')
const_set('IOGate', Reline::GeneralIO)
- @@config.instance_variable_set(:@test_mode, true)
- @@config.reset
+ send(:core).config.instance_variable_set(:@test_mode, true)
+ send(:core).config.reset
+ end
+
+ def test_reset
+ Reline.instance_variable_set(:@core, nil)
end
end
end