Problem running tests

469 views
Skip to first unread message

Holger Schmeisky

unread,
Aug 22, 2013, 5:43:43 AM8/22/13
to ruby-opt...@googlegroups.com
Hi,

I am trying to extend ruby-prof and want to run the tests for it. Installing the ruby-prof gem works flawlessly, but executing rake test yields:


MiniTest::Unit::TestCase is now Minitest::Test. From /usr/lib/ruby/1.9.1/test/unit/testcase.rb:8:in `<module:Unit>'
/usr/lib/ruby/1.9.1/test/unit.rb:328:in `autorun': uninitialized class variable @@installed_at_exit in Test::Unit::Runner (NameError)
    from /usr/lib/ruby/1.9.1/test/unit.rb:640:in `<top (required)>'
    from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:51:in `require'
    from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:51:in `require'
    from /usr/lib/ruby/gems/1.9.1/gems/ruby-prof-0.13.0/test/test_helper.rb:28:in `<top (required)>'
    from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:51:in `require'
    from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:51:in `require'
    from /usr/lib/ruby/gems/1.9.1/gems/ruby-prof-0.13.0/test/test_suite.rb:3:in `<top (required)>'
    from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:51:in `require'
    from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:51:in `require'
    from /usr/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/rake_test_loader.rb:15:in `block in <main>'
    from /usr/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/rake_test_loader.rb:4:in `select'
    from /usr/lib/ruby/gems/1.9.1/gems/rake-10.1.0/lib/rake/rake_test_loader.rb:4:in `<main>'
rake aborted!


I think this might be an issue with using Minitest and Test::Unit at the same time, because somebody else reports the same problem:

https://github.com/seattlerb/minitest/issues/283

But does anyone here have the same problem, or am I just doing something basic wrong?

Thanks for help,
Holger

Piotr Szotkowski

unread,
Aug 22, 2013, 7:04:58 PM8/22/13
to ruby-opt...@googlegroups.com
Holger Schmeisky:

> MiniTest::Unit::TestCase is now Minitest::Test.

Can you try with a pre-5.0 minitest (e.g.
minitest 4.7.5 or the one shipped with Ruby)?

— Piotr Szotkowski
--
I think if somebody who doesn’t even know code, they can look at a piece of
Ruby code, and they can appreciate that Ruby is French and Java is German.
[David Heinemeier Hansson]



signature.asc

Holger Schmeisky

unread,
Aug 28, 2013, 2:11:11 PM8/28/13
to ruby-opt...@googlegroups.com
Hi,

it works again if I change the gemspec to use minitest 4.0

 spec.add_development_dependency('minitest', "~> 4.0")

This was suggested in the github issue I linked to above.

Regards,
Holger

Holger Schmeisky

unread,
Aug 29, 2013, 4:23:16 PM8/29/13
to ruby-opt...@googlegroups.com
Hi,

someone already fixed this by the same solution.

https://github.com/ruby-prof/ruby-prof/pull/126

Regards,
Holger
Reply all
Reply to author
Forward
0 new messages