Re: Tests not being run in pbuilder
Hi,
On Sun, Jan 11, 2015 at 06:16:53PM +0530, ബാലശങ്കർ സി wrote:
> > Did you remove ruby-test-unit?
> Yes. I did remove it. This is the current setting
> Build-Depends: debhelper (>= 7.0.50~), gem2deb, ruby-actionpack,
> ruby-minitest
I misinterpreted the results of my tests in my previous message. Indeed,
switching to ruby-minitest is not enough. There are in fact two causes:
- first, you should add ruby-mocha to the Build-Depends line. The
caching_test.rb file uses an @expects method from mocha. I don't see
right now how it gets loaded, since there are no require "mocha"
statement, but at least, mocha is listed in the gemspec as a build
dependency.
- the second is a bit more subtle: you need to add also rake to the
build dependency. If you don't then the rake bundled with ruby2.1 will
be used, which will prefer the version of minitest bundled with
ruby2.1, which causes a conflict with ruby-minitest. Check the paths
of the files in the error message:
/usr/lib/ruby/vendor_ruby/minitest/assertions.rb:17: warning: already initialized constant MiniTest::Assertions::UNDEFINED
/usr/lib/ruby/2.1.0/minitest/unit.rb:80: warning: previous definition of UNDEFINED was here
the problem with the two versions of minitest occurs even if you don't
put ruby-minitest in the build-depends line, because ruby-minitest gets
pulled from the dependency chain:
ruby-actionpack -> ruby-activesupport -> ruby-minitest
even if it is (now) not needed, leave ruby-minitest in the build-deps,
it has the advantage to be explicit.
It is now working for me. I hope it will for you too :)
Cédric
Reply to: