ci-reporter / ci_reporter

CI::Reporter is an add-on to popular test frameworks that allows you to generate XML reports
MIT License
343 stars 110 forks source link

ci_reporter does not work with minitest >= 5.0.0 #110

Closed okitan closed 10 years ago

okitan commented 10 years ago
/Users/okitan/.rvm/rubies/ruby-2.0.0-p0/bin/ruby -Ilib -I/Users/okitan/.rvm/gems/ruby-2.0.0-p0@global/gems/bundler-1.3.4/lib -rbundler/setup -rci/reporter/rake/minitest_loader acceptance/minite
st_example_test.rb
Warning: you should require 'minitest/autorun' instead.
Warning: or add 'gem "minitest"' before 'require "minitest/autorun"'
From:
  /Users/okitan/codes/ci_reporter/lib/ci/reporter/minitest.rb:7:in `require'
  /Users/okitan/codes/ci_reporter/lib/ci/reporter/minitest.rb:7:in `<top (required)>'
  /Users/okitan/codes/ci_reporter/lib/ci/reporter/rake/minitest_loader.rb:6:in `require'
  /Users/okitan/codes/ci_reporter/lib/ci/reporter/rake/minitest_loader.rb:6:in `<top (required)>'
  acceptance/minitest_example_test.rb:1:in `require'
/Users/okitan/codes/ci_reporter/lib/ci/reporter/rake/minitest_loader.rb:9:in `<top (required)>': undefined method `runner=' for Minitest::Unit:Class (NoMethodError)
        from acceptance/minitest_example_test.rb:1:in `require'
Failures above are expected.
/Users/okitan/.rvm/rubies/ruby-2.0.0-p0/bin/ruby -Ilib -I/Users/okitan/.rvm/gems/ruby-2.0.0-p0@global/gems/bundler-1.3.4/lib -rbundler/setup -S /Users/okitan/.rvm/gems/ruby-2.0.0-p0@ci_reporter
/gems/rspec-core-2.14.7/exe/rspec --require ci/reporter/rake/rspec_loader --format CI::Reporter::RSpec acceptance/rspec_example_spec.rb
Run options: include {:wip=>true}

I'm a stranger of minitest, but it seems minitest 5.0.0 forbids to access runner.

See its CHANGELOG https://github.com/seattlerb/minitest/blob/34760e3b268bc1bb4ac5fe1a44ef1ff0a2f9bd4d/History.txt#L91

okitan commented 10 years ago

The simpest solution is to change gemspec to limit minitest version, and I found all test passed (of course considering #109).

gem 'minitest', '< 5.0.0'
/Users/okitan/.rvm/rubies/ruby-2.0.0-p0/bin/ruby -S rspec acceptance/verification_spec.rb --color
Run options: include {:wip=>true}

All examples were filtered out; ignoring {:wip=>true}
..................

Finished in 0.05753 seconds
18 examples, 0 failures
ares commented 10 years ago

Have the same problem here

shepmaster commented 10 years ago

ci_reporter_minitest supports 5.x.