rubygems/rubygems — Issue #222: Failure when test_gem_indexer.rb is run in isolation
Author: agrimm
Created: 2011-11-27 09:45:12+00:00
State: open

Unit tests for test_gem_indexer.rb fail when the file is run in isolation, but not when it's run as part of the whole test suite. This is presumably caused by some unit tests not cleaning up after themselves, and relying on other tests to do the cleaning up.

The commit that caused this was 2786a40b71f1e2711fb0ba5d7e0cc41591c77fa5 .

192-168-1-107:rubygems agrimm$ ruby --version
ruby 2.0.0dev (2011-11-27 trunk 33860) [x86_64-darwin10.8.0]
192-168-1-107:rubygems agrimm$ git checkout master > /dev/null 2> /dev/null
192-168-1-107:rubygems agrimm$ rake test_deps
Dependency Issues: test/rubygems/test_gem_indexer.rb
192-168-1-107:rubygems agrimm$ git checkout 2786a40b71f1e2711fb0ba5d7e0cc41591c77fa5 > /dev/null 2> /dev/null
192-168-1-107:rubygems agrimm$ rake test_deps
Dependency Issues: test/rubygems/test_gem_indexer.rb
192-168-1-107:rubygems agrimm$ git checkout 2786a40b71f1e2711fb0ba5d7e0cc41591c77fa5^ > /dev/null 2> /dev/null
192-168-1-107:rubygems agrimm$ rake test_deps
192-168-1-107:rubygems agrimm$
192-168-1-107:rubygems agrimm$ git checkout master > /dev/null 2> /dev/null
192-168-1-107:rubygems agrimm$ ruby -w -Ilib:bin:test:. --disable-gems -e 'require "rubygems"; require "test/unit"; require "test/rubygems/test_gem_indexer.rb"' -- --name test_generate_index
Run options: --name test_generate_index

# Running tests:

F

Finished tests in 0.193427s, 5.1699 tests/s, 62.0389 assertions/s.

1) Failure:
test_generate_index(TestGemIndexer) [/Users/agrimm/ruby/wip/rubygems/test/rubygems/test_gem_indexer.rb:280]:
--- expected
+++ actual
@@ -98,7 +98,7 @@
example@example.com (A User)
dep_x-1

+ length=\"3072\" type=\"application/octet-stream\" />
Sun, 27 Nov 2011 00:00:00 -0000
http://example.com

1 tests, 12 assertions, 1 failures, 0 errors, 0 skips

ruby -v: ruby 2.0.0dev (2011-11-27 trunk 33860) [x86_64-darwin10.8.0]
192-168-1-107:rubygems agrimm$ git checkout 2786a40b71f1e2711fb0ba5d7e0cc41591c77fa5 > /dev/null 2> /dev/null
192-168-1-107:rubygems agrimm$ ruby -w -Ilib:bin:test:. --disable-gems -e 'require "rubygems"; require "test/unit"; require "test/rubygems/test_gem_indexer.rb"' -- --name test_generate_index

# load of warnings snipped

# Running tests:

F

Finished tests in 0.181172s, 5.5196 tests/s, 66.2354 assertions/s.

1) Failure:
test_generate_index(TestGemIndexer) [/Users/agrimm/ruby/wip/rubygems/test/rubygems/test_gem_indexer.rb:280]:
--- expected
+++ actual
@@ -98,7 +98,7 @@
example@example.com (A User)
dep_x-1

+ length=\"3072\" type=\"application/octet-stream\" />
Sun, 27 Nov 2011 00:00:00 -0000
http://example.com

1 tests, 12 assertions, 1 failures, 0 errors, 0 skips

ruby -v: ruby 2.0.0dev (2011-11-27 trunk 33860) [x86_64-darwin10.8.0]
192-168-1-107:rubygems agrimm$ git checkout 2786a40b71f1e2711fb0ba5d7e0cc41591c77fa5^ > /dev/null 2> /dev/null
192-168-1-107:rubygems agrimm$ ruby -w -Ilib:bin:test:. --disable-gems -e 'require "rubygems"; require "test/unit"; require "test/rubygems/test_gem_indexer.rb"' -- --name test_generate_index

# load of warnings snipped

Run options: --name test_generate_index

# Running tests:

.

Finished tests in 0.141776s, 7.0534 tests/s, 84.6406 assertions/s.

1 tests, 12 assertions, 0 failures, 0 errors, 0 skips

ruby -v: ruby 2.0.0dev (2011-11-27 trunk 33860) [x86_64-darwin10.8.0]