summaryrefslogtreecommitdiff
path: root/test/rdoc
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-07-01 02:05:35 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-07-01 02:05:35 +0000
commitf058f2d8451abb25c149ab5fca31ffa497d13121 (patch)
treea8ea6203a6c2eb2d23d73d5edcd8008b6ee0fb7b /test/rdoc
parent2a43e8983da9b7efbe03e910e0ce41acf003abfa (diff)
merges r28455 and r28460 from trunk into ruby_1_9_2.
-- * lib/rdoc/ri/driver.rb (RDoc::RI::Driver#formatter): should use bs format when stdout is piped. [ruby-core:30734] -- * test/rdoc/test_rdoc_ri_driver.rb (TestRDocRIDriver#test_formatter): fix a test accordingly to r28455. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@28504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rdoc')
-rw-r--r--test/rdoc/test_rdoc_ri_driver.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/rdoc/test_rdoc_ri_driver.rb b/test/rdoc/test_rdoc_ri_driver.rb
index 51f2576cb4..8d64916088 100644
--- a/test/rdoc/test_rdoc_ri_driver.rb
+++ b/test/rdoc/test_rdoc_ri_driver.rb
@@ -498,15 +498,18 @@ Foo::Bar#bother
def test_formatter
driver = RDoc::RI::Driver.new
- assert_instance_of @RM::ToAnsi, driver.formatter
+ io = Object.new
+ def io.tty?; true; end
+
+ assert_instance_of @RM::ToAnsi, driver.formatter(io)
driver.instance_variable_set :@paging, true
- assert_instance_of @RM::ToBs, driver.formatter
+ assert_instance_of @RM::ToBs, driver.formatter(io)
driver.instance_variable_set :@formatter_klass, @RM::ToHtml
- assert_instance_of @RM::ToHtml, driver.formatter
+ assert_instance_of @RM::ToHtml, driver.formatter(io)
end
def test_method_type