From 46d0c369717c22757987a546cd7e72db5c581b19 Mon Sep 17 00:00:00 2001 From: tompng Date: Sun, 24 Sep 2023 01:30:47 +0900 Subject: [PATCH] Disable pager in show-source test --- test/irb/test_cmd.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/irb/test_cmd.rb b/test/irb/test_cmd.rb index e8c959ec3..945944c26 100644 --- a/test/irb/test_cmd.rb +++ b/test/irb/test_cmd.rb @@ -444,6 +444,16 @@ def test_irb_load_without_argument end class ShowSourceTest < 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_source out, err = execute_lines( "show_source IRB.conf\n",