2014-04-15 36 views
3

我無法獲取ci_reporter來生成xml文件。讓我列舉我的文件:ci_reporter 1.9.2 + minitest 4.7.5 = no xml reports

的Gemfile

group :test do 
    gem 'ci_reporter' 
    gem 'minitest' 
end 

Rake文件

require File.expand_path('../config/application', __FILE__) 

application::Application.load_tasks 

#require 'ci/reporter/rake/test_unit' # use this if you're using Test::Unit 
require 'ci/reporter/rake/minitest' # use this if you're using Ruby 1.9 or minitest 

端子輸入

rake ci:setup:minitest test 

端子輸出

$ rake ci:setup:minitest test 
rm -rf reports 
Run options: --seed 7837 

# Running tests: 

. 

Finished tests in 0.002910s, 343.6426 tests/s, 343.6426 assertions/s. 

1 tests, 1 assertions, 0 failures, 0 errors, 0 skips 

我期待看到一個xml文件test/reports/;然而,那裏什麼也沒有。

回答

1

我認爲這是使用Rails 4個問題,我能夠在這裏找到一個解決辦法:https://github.com/nicksieger/ci_reporter/issues/106

pbendersky評論3個月前

...包括MINITEST,記者在你的Gemfile並將以下內容添加到test_helper.rb。

test_helper.rb中:

require 'minitest/reporters' 
MiniTest::Reporters.use! [MiniTest::Reporters::DefaultReporter.new, 
          MiniTest::Reporters::JUnitReporter.new]