Skip to content

Commit

Permalink
Disable pager in show-source test (#720)
Browse files Browse the repository at this point in the history
  • Loading branch information
tompng authored Sep 26, 2023
1 parent e001326 commit 5669efa
Showing 1 changed file with 4 additions and 20 deletions.
24 changes: 4 additions & 20 deletions test/irb/test_cmd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ def setup
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
Expand All @@ -31,6 +34,7 @@ def teardown
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)
Expand Down Expand Up @@ -665,16 +669,6 @@ def test_whereami_alias


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"
Expand All @@ -687,16 +681,6 @@ def test_show_cmds
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",
Expand Down

0 comments on commit 5669efa

Please sign in to comment.