On Mon, Jan 07, 2019 at 11:44:53PM +0530, Sruthi Chandran wrote: > Hi all, > > In the process of rails5 migration, I updated ruby-sinatra. But while > enabling autopkgtests, tests are failing. Need help with this. > > > > RUBYLIB=. GEM_PATH= ruby2.5 -S rake -f debian/ruby-tests.rake > /tmp/autopkgtest-lxc.of6qhhoo/downtmp/build.CRG/src/test/helper.rb:11: > warning: setting Encoding.default_external > /usr/lib/ruby/vendor_ruby/creole/parser.rb:255: warning: character class > has duplicated range: /\A([:alpha:]|[:digit:])+/ > cannot load such file -- erubi: skipping erubi tests > > File does not exist: > /tmp/autopkgtest-lxc.of6qhhoo/downtmp/build.CRG/src/lib/sinatra/indifferent_hash > > rake aborted! > Command failed with status (1) > > > > I tried patching it to use installed library (require 'sinatra'), but > then it is failing even in build.
you need to require the equivalent file in a location-independent way, not just "sinatra". the patch below makes it work for me: ----------------8<----------------8<----------------8<----------------- diff --git a/test/indifferent_hash_test.rb b/test/indifferent_hash_test.rb index 4cb21f7..f984af2 100644 --- a/test/indifferent_hash_test.rb +++ b/test/indifferent_hash_test.rb @@ -8,7 +8,7 @@ require 'minitest/autorun' unless defined?(Minitest) # outside of the full suite, on older Rubies. ENV['SINATRA_ACTIVESUPPORT_WARNING'] = 'false' -require_relative '../lib/sinatra/indifferent_hash' +require 'sinatra/indifferent_hash' class TestIndifferentHashBasics < Minitest::Test def test_flattened_constructor ----------------8<----------------8<----------------8<----------------- This should probably be submitted upstream.
signature.asc
Description: PGP signature