summaryrefslogtreecommitdiff
path: root/test/irb/test_option.rb
diff options
context:
space:
mode:
authorStan Lo <stan.lo@shopify.com>2022-11-03 22:13:07 +0000
committergit <svn-admin@ruby-lang.org>2022-11-03 22:13:11 +0000
commita9232038119f2401e6c3d3a4946114b1e878afb5 (patch)
tree14465474a9e8aa589bd793d42d96dfbd58c91214 /test/irb/test_option.rb
parenta13836e70d9cc2eb569911030cbd735d68b4042c (diff)
[ruby/irb] Provide a base test class and let tests restore encodings
conveniently (https://github.com/ruby/irb/pull/429) * Create a base TestIRB::TestCase class * Save/restore encodings for tests that initializes InputMethod classes Because `RelineInputMethod#initializes` calls `set_encoding`, which changes stdio/out/err and Encoding's default encoding values, we need to make sure any test that directly or indirectly (e.g. through Context) initializes `RelineInputMethod` restores encodings. `ReadlineInputMethod` also changes encodings but currently no tests cover it. * Remove unnecessary TestHelper module Since we now have a base TestCase, without_rdoc can just live there. https://github.com/ruby/irb/commit/c2874ec121
Diffstat (limited to 'test/irb/test_option.rb')
-rw-r--r--test/irb/test_option.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/irb/test_option.rb b/test/irb/test_option.rb
index aa634c02a2..e334cee6dd 100644
--- a/test/irb/test_option.rb
+++ b/test/irb/test_option.rb
@@ -1,8 +1,8 @@
# frozen_string_literal: false
-require 'test/unit'
+require_relative "helper"
module TestIRB
- class TestOption < Test::Unit::TestCase
+ class TestOption < TestCase
def test_end_of_option
bug4117 = '[ruby-core:33574]'
bundle_exec = ENV.key?('BUNDLE_GEMFILE') ? ['-rbundler/setup'] : []