Hi,
I’ve got an issue with some unit tests which pass fine under rake and
when run manually, but fail when run at gem installation time.
Unfortunately, gem doesn’t specify which tests fail - is there a way
to change this behaviour? Or can anyone suggest any reasons for tests
failing under gem -t but not under Rake?
I’ve pasted a session below showing what I mean. The rake test passes
fine, then I build a fresh gem and attempt a gem -t install. This
shows a few failures but I install anyway. Then I move to the gem
directory and run the tests from there which again pass without
failing. Knowing which tests are failing would be a start.
~/rubyforge/rsruby$ rake test
/opt/ruby/lib/ruby/gems/bin/rake:17:Warning: require_gem is
obsolete. Use gem instead.
(in /home/alexg/rubyforge/rsruby)
/opt/ruby/bin/ruby -w -Ilib:ext:bin:test test/test_all.rb
Loaded suite test/test_all
Started
…
…
Finished in 0.584575 seconds.
79 tests, 201 assertions, 0 failures, 0 errors
~/rubyforge/rsruby$ rake package
/opt/ruby/lib/ruby/gems/bin/rake:17:Warning: require_gem is
obsolete. Use gem instead.
(in /home/alexg/rubyforge/rsruby)
Successfully built RubyGem
Name: rsruby
Version: 0.4.3
File: rsruby-0.4.3.gem
mv rsruby-0.4.3.gem pkg/rsruby-0.4.3.gem
~/rubyforge/rsruby$ gem install pkg/rsruby-0.4.3.gem -t – --with-R-
dir=$R_HOME
Building native extensions. This could take a while…
Successfully installed rsruby, version 0.4.3
Installing ri documentation for rsruby-0.4.3…
Installing RDoc documentation for rsruby-0.4.3…
ERROR: 79 tests, 195 assertions, 5 failures, 1 errors
…keep Gem? [Yn] y
~/rubyforge/rsruby$ cd /opt/ruby/lib/ruby/gems/gems/rsruby-0.4.3/
/opt/ruby/lib/ruby/gems/gems/rsruby-0.4.3$ ruby test/test_all.rb
Loaded suite test/test_all
Started
…
…
Finished in 0.585885 seconds.
79 tests, 201 assertions, 0 failures, 0 errors
/opt/ruby/lib/ruby/gems/gems/rsruby-0.4.3$
Alex G.
Bioinformatics Center
Kyoto University