aboutsummaryrefslogtreecommitdiffstats
path: root/test/irb/test_cmd.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/irb/test_cmd.rb')
-rw-r--r--test/irb/test_cmd.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/irb/test_cmd.rb b/test/irb/test_cmd.rb
index 71df60db14..71d64a0ec2 100644
--- a/test/irb/test_cmd.rb
+++ b/test/irb/test_cmd.rb
@@ -688,6 +688,16 @@ 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"