diff options
Diffstat (limited to 'test/irb/test_context.rb')
-rw-r--r-- | test/irb/test_context.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/irb/test_context.rb b/test/irb/test_context.rb index 2dba42d321..63e71e5867 100644 --- a/test/irb/test_context.rb +++ b/test/irb/test_context.rb @@ -42,6 +42,17 @@ module TestIRB IRB.conf[:VERBOSE] = false workspace = IRB::WorkSpace.new(Object.new) @context = IRB::Context.new(nil, workspace, TestInputMethod.new) + + @get_screen_size = Reline.method(:get_screen_size) + Reline.instance_eval { undef :get_screen_size } + def Reline.get_screen_size + [36, 80] + end + end + + def teardown + Reline.instance_eval { undef :get_screen_size } + Reline.define_singleton_method(:get_screen_size, @get_screen_size) end def test_last_value |