Skip to content

Commit

Permalink
Fix some RDoc and RubyGems test interactions. Fix -n in test/runner.rb
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
drbrain committed Sep 29, 2008
1 parent 6270b50 commit a42df50
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
Tue Sep 30 07:46:07 2008 Eric Hodel <[email protected]>

* test/rdoc/test_rdoc_markup_attribute_manager.rb: Test with clean
SPECIALS.
* test/rubygems/gemutilities.rb: Restore ENV['HOME'] after test.
* test/runner.rb: Pass -n argument down to miniunit.

Tue Sep 30 01:02:55 2008 Nobuyoshi Nakada <[email protected]>

* parse.y (token_info_push, token_info_pop): do nothing for evaled
Expand Down
7 changes: 7 additions & 0 deletions test/rdoc/test_rdoc_markup_attribute_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
class TestRDocMarkupAttributeManager < Test::Unit::TestCase

def setup
@orig_special = RDoc::Markup::AttributeManager::SPECIAL
RDoc::Markup::AttributeManager::SPECIAL.replace Hash.new

@am = RDoc::Markup::AttributeManager.new

@bold_on = @am.changed_attribute_by_name([], [:BOLD])
Expand All @@ -28,6 +31,10 @@ def setup
@wombat_off = @am.changed_attribute_by_name([:WOMBAT], [])
end

def teardown
RDoc::Markup::AttributeManager::SPECIAL.replace @orig_special
end

def crossref(text)
crossref_bitmap = RDoc::Markup::Attribute.bitmap_for(:_SPECIAL_) |
RDoc::Markup::Attribute.bitmap_for(:CROSSREF)
Expand Down
7 changes: 7 additions & 0 deletions test/rubygems/gemutilities.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def setup
@latest_usrcache = File.join(@gemhome, ".gem", "latest_user_cache")
@userhome = File.join @tempdir, 'userhome'

@orig_ENV_HOME = ENV['HOME']
ENV['HOME'] = @userhome
Gem.instance_variable_set :@user_home, nil

Expand Down Expand Up @@ -131,6 +132,12 @@ def teardown
ENV.delete 'GEM_PATH'

Gem.clear_paths

if @orig_ENV_HOME then
ENV['HOME'] = @orig_ENV_HOME
else
ENV.delete 'HOME'
end
end

def install_gem gem
Expand Down
2 changes: 2 additions & 0 deletions test/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ def tu_deprecation_warning old, new = nil, kaller = nil
other.push(*ARGV)
ARGV.clear
break
when /^-(n|-name)$/ then
other.push arg, ARGV.shift
when /^-/ then
other << arg
else
Expand Down

0 comments on commit a42df50

Please sign in to comment.