2

I am trying to use CI::reporter to generate report of ruby unit tests. My 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

My test1.rb file:

require 'test/unit'

class Test1 < Test::Unit::TestCase

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

end

The command I am running:

rake ci:setup:testunit test CI_REPORTS=results

The command's output:

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

Now in the command output, it is 'rm -rf'ing the result directory, so CI is definitely getting called, but I see no results directory.

the Tin Man
  • 158,662
  • 42
  • 215
  • 303
cheekoo
  • 887
  • 12
  • 22
  • A couple things that I don't think will matter: I don't believe oyu need to call ci:setup:testunit if you're manually requiring 'ci/reporter/rake/test_unit'. You also don't need to include 'ci/reporter/rake/rspec' if you're not using rspec (you're not in this example). Other than that, I don't see anything, sorry. :-\ – Matthew Ratzloff May 18 '11 at 18:30
  • @Matthew, I agree. I was just trying all sort of things in irritation and hence the dups and un-needed imports. – cheekoo May 18 '11 at 18:48

0 Answers0