Hi all,
I spent several hours yesterday fixing this bug, as it affects one of my
packages (prometheus).
I managed to fix this particular error, and it is simple: MiniTest::Test
should be replaced by MiniTest::Unit::TestCase (dquilt patch attached).
The problem I could not solve, is that during the tests, the code looks
for the handlebars.js file in an absolute path, which obviously fails if
this is run in a clean chroot. I could not find a way to set the
relative path properly, as I really don't understand Ruby.
RUBYLIB=/home/tincho/repos/prometheus/ruby-handlebars-assets/debian/ruby-handlebars-assets/usr/lib/ruby/vendor_ruby:.
rake2.1 -f debian/ruby-tests.rake
Run options: --seed 30204
# Running tests:
E.EEEEEEEEE.EEEE
Finished tests in 0.281625s, 56.8131 tests/s, 17.7541 assertions/s.
1) Error:
HandlebarsAssets::CompilingTestx#test_patching_handlebars:
Errno::ENOENT: No such file or directory @ rb_sysopen -
/usr/share/ruby-handlebars-assets/vendor/assets/javascripts/handlebars.js
/home/tincho/repos/prometheus/ruby-handlebars-assets/lib/handlebars_assets/handlebars.rb:35:in
`read'
/home/tincho/repos/prometheus/ruby-handlebars-assets/lib/handlebars_assets/handlebars.rb:35:in
`read'
/home/tincho/repos/prometheus/ruby-handlebars-assets/lib/handlebars_assets/handlebars.rb:35:in
`source'
/home/tincho/repos/prometheus/ruby-handlebars-assets/lib/handlebars_assets/handlebars.rb:18:in
`append_patch'
/home/tincho/repos/prometheus/ruby-handlebars-assets/lib/handlebars_assets/handlebars.rb:24:in
`block in apply_patches_to_source'
/home/tincho/repos/prometheus/ruby-handlebars-assets/lib/handlebars_assets/handlebars.rb:23:in
`each'
/home/tincho/repos/prometheus/ruby-handlebars-assets/lib/handlebars_assets/handlebars.rb:23:in
`apply_patches_to_source'
/home/tincho/repos/prometheus/ruby-handlebars-assets/lib/handlebars_assets/handlebars.rb:31:in
`context'
/home/tincho/repos/prometheus/ruby-handlebars-assets/lib/handlebars_assets/handlebars.rb:10:in
`precompile'
/home/tincho/repos/prometheus/ruby-handlebars-assets/test/handlebars_assets/compiling_test.rb:26:in
`test_patching_handlebars'
/usr/lib/ruby/2.1.0/minitest/unit.rb:1265:in `run'
/usr/lib/ruby/2.1.0/minitest/unit.rb:940:in `block in _run_suite'
/usr/lib/ruby/2.1.0/minitest/unit.rb:933:in `map'
/usr/lib/ruby/2.1.0/minitest/unit.rb:933:in `_run_suite'
/usr/lib/ruby/2.1.0/minitest/unit.rb:914:in `block in _run_suites'
/usr/lib/ruby/2.1.0/minitest/unit.rb:914:in `map'
/usr/lib/ruby/2.1.0/minitest/unit.rb:914:in `_run_suites'
/usr/lib/ruby/2.1.0/minitest/unit.rb:884:in `_run_anything'
/usr/lib/ruby/2.1.0/minitest/unit.rb:1092:in `run_tests'
/usr/lib/ruby/2.1.0/minitest/unit.rb:1079:in `block in _run'
/usr/lib/ruby/2.1.0/minitest/unit.rb:1078:in `each'
/usr/lib/ruby/2.1.0/minitest/unit.rb:1078:in `_run'
/usr/lib/ruby/2.1.0/minitest/unit.rb:1066:in `run'
/usr/lib/ruby/2.1.0/minitest/unit.rb:802:in `block in autorun'
--
Martín Ferrari (Tincho)
--- a/test/handlebars_assets/compiling_test.rb
+++ b/test/handlebars_assets/compiling_test.rb
@@ -1,7 +1,7 @@
require 'test_helper'
module HandlebarsAssets
- class CompilingTest < ::MiniTest::Test
+ class CompilingTestx < MiniTest::Unit::TestCase
def teardown
HandlebarsAssets::Config.reset!
--- a/test/handlebars_assets/hamlbars_test.rb
+++ b/test/handlebars_assets/hamlbars_test.rb
@@ -1,7 +1,7 @@
require 'test_helper'
module HandlebarsAssets
- class HamlbarsTest < ::Minitest::Test
+ class HamlbarsTest < ::MiniTest::Unit::TestCase
include SprocketsScope
include CompilerSupport
--- a/test/handlebars_assets/slimbars_test.rb
+++ b/test/handlebars_assets/slimbars_test.rb
@@ -1,7 +1,7 @@
require 'test_helper'
module HandlebarsAssets
- class SlimbarsTest < ::Minitest::Test
+ class SlimbarsTest < ::MiniTest::Unit::TestCase
include SprocketsScope
include CompilerSupport
--- a/test/handlebars_assets/tilt_handlebars_test.rb
+++ b/test/handlebars_assets/tilt_handlebars_test.rb
@@ -1,7 +1,7 @@
require 'test_helper'
module HandlebarsAssets
- class HandlebarsTemplateTest < Minitest::Test
+ class HandlebarsTemplateTest < MiniTest::Unit::TestCase
include CompilerSupport
include SprocketsScope
_______________________________________________
Pkg-ruby-extras-maintainers mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-ruby-extras-maintainers