summaryrefslogtreecommitdiff
path: root/test/rdoc
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-02 06:26:24 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-02 06:26:24 +0000
commitcf25ae4551f623121b9047e1c94a872583b545aa (patch)
treee5663d73e8095e63f2f79326e8d8a278541f6dbb /test/rdoc
parentbb471e32687defb003d0009eba018f15bd143f7b (diff)
downloadbundler-cf25ae4551f623121b9047e1c94a872583b545aa.tar.gz
* test/rdoc/test_rdoc_ri_driver.rb (with_dummy_pager): don't grap
terminal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rdoc')
-rw-r--r--test/rdoc/test_rdoc_ri_driver.rb19
1 files changed, 15 insertions, 4 deletions
diff --git a/test/rdoc/test_rdoc_ri_driver.rb b/test/rdoc/test_rdoc_ri_driver.rb
index 27b59eb811..c41a130e77 100644
--- a/test/rdoc/test_rdoc_ri_driver.rb
+++ b/test/rdoc/test_rdoc_ri_driver.rb
@@ -34,6 +34,15 @@ class TestRDocRIDriver < MiniTest::Unit::TestCase
FileUtils.rm_rf @tmpdir
end
+ DUMMY_PAGER = ":;\n"
+
+ def with_dummy_pager
+ pager_env, ENV['RI_PAGER'] = ENV['RI_PAGER'], DUMMY_PAGER
+ yield
+ ensure
+ ENV['RI_PAGER'] = pager_env
+ end
+
def mu_pp(obj)
s = ''
s = PP.pp obj, s
@@ -558,10 +567,12 @@ Foo::Bar#bother
def test_page
@driver.use_stdout = false
- @driver.page do |io|
- skip "couldn't find a standard pager" if io == $stdout
+ with_dummy_pager do
+ @driver.page do |io|
+ skip "couldn't find a standard pager" if io == $stdout
- assert @driver.paging?
+ assert @driver.paging?
+ end
end
refute @driver.paging?
@@ -664,7 +675,7 @@ Foo::Bar#bother
def test_setup_pager
@driver.use_stdout = false
- pager = @driver.setup_pager
+ pager = with_dummy_pager {@driver.setup_pager}
skip "couldn't find a standard pager" unless pager