2

我正在尝试使用 CI::reporter 生成 ruby​​ 单元测试的报告。我的 rakefile:

require 'rake'

require 'rake/testtask'
require 'rake/packagetask'
require 'rake'
require 'rake/testtask'
require 'rake/packagetask'
#require 'spec/version'
#require 'spec/rake/spectask'
#require 'rcov'
gem 'ci_reporter'
require 'ci/reporter/rake/test_unit'  #http://juretta.com/log/2008/11/11/hudson_test_drive_part_1_rails/
require 'ci/reporter/rake/rspec'

task :test do
  ruby "test/test1.rb"
end

我的 test1.rb 文件:

require 'test/unit'

class Test1 < Test::Unit::TestCase

  def test_add
    s = 1 + 1
    assert_equal(2, s)
  end

end

我正在运行的命令:

rake ci:setup:testunit test CI_REPORTS=results

命令的输出:

sgoyal@sgoyal-macbook:~/tmp/rake_test/ ==> rake ci:setup:testunit test CI_REPORTS=results
(in /Users/sgoyal/tmp/rake_test)
rm -rf results
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby test/test1.rb
warning: Insecure world writable dir /data in PATH, mode 040777
Loaded suite test/test1
Started
.
Finished in 0.000235 seconds.

1 tests, 1 assertions, 0 failures, 0 errors

现在在命令输出中,它是“rm -rf”结果目录,所以 CI 肯定会被调用,但我看不到结果目录。

4

0 回答 0