diff options
| author | tomoya ishida <tomoyapenguin@gmail.com> | 2023-09-26 19:06:13 +0900 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2023-09-26 10:06:17 +0000 |
| commit | c2c0a083f024f9d0ee7a05c2cdbc4146ff3b2138 (patch) | |
| tree | 074fdf166196588fccfa923bb069cb94e2c9ce77 | |
| parent | 4199e49cad0adddb48d58fa2b0a50563bfd40dac (diff) | |
[ruby/irb] Disable pager in show-source test
(https://github.com/ruby/irb/pull/720)
https://github.com/ruby/irb/commit/5669efa4c1
| -rw-r--r-- | test/irb/test_cmd.rb | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/test/irb/test_cmd.rb b/test/irb/test_cmd.rb index e8c959ec39..fd0a02a7af 100644 --- a/test/irb/test_cmd.rb +++ b/test/irb/test_cmd.rb @@ -23,6 +23,9 @@ module TestIRB save_encodings IRB.instance_variable_get(:@CONF).clear @is_win = (RbConfig::CONFIG['host_os'] =~ /mswin|msys|mingw|cygwin|bccwin|wince|emc/) + STDIN.singleton_class.define_method :tty? do + false + end end def teardown @@ -31,6 +34,7 @@ module TestIRB Dir.chdir(@pwd) FileUtils.rm_rf(@tmpdir) restore_encodings + STDIN.singleton_class.remove_method :tty? end def execute_lines(*lines, conf: {}, main: self, irb_path: nil) @@ -665,16 +669,6 @@ module TestIRB class ShowCmdsTest < CommandTestCase - def setup - STDIN.singleton_class.define_method :tty? do - false - end - end - - def teardown - STDIN.singleton_class.remove_method :tty? - end - def test_show_cmds out, err = execute_lines( "show_cmds\n" @@ -687,16 +681,6 @@ module TestIRB end class LsTest < CommandTestCase - def setup - STDIN.singleton_class.define_method :tty? do - false - end - end - - def teardown - STDIN.singleton_class.remove_method :tty? - end - def test_ls out, err = execute_lines( "class P\n", |
