Permalink
Browse files

Update build system for CI

Add ci_reporter for Jenkins CI.
Use simplecov but it might not work fine at this moment.
  • Loading branch information...
1 parent 5ffce47 commit 929824b2be27c967f826773181f3cc427d28a1cd @nahi committed Jan 4, 2012
Showing with 18 additions and 11 deletions.
  1. +9 −2 Gemfile
  2. +4 −9 Rakefile
  3. +5 −0 test/helper.rb
View
11 Gemfile
@@ -4,7 +4,14 @@ platform :jruby do
gem 'jruby-openssl'
end
-gem 'rake'
-gem 'rdoc'
+group :development do
+ gem 'rake'
+ gem 'rdoc'
+ gem 'simplecov'
+ # For Jenkins
+ gem 'test-unit'
+ gem 'ci_reporter'
+ gem 'simplecov-rcov'
+end
gemspec
View
@@ -2,22 +2,17 @@ require 'rake'
require 'rake/testtask'
require 'rdoc/task'
require 'rubygems/package_task'
+require 'ci/reporter/rake/test_unit'
task :default => :test
require 'bundler'
Bundler::GemHelper.install_tasks
-begin
- require 'rcov/rcovtask'
- Rcov::RcovTask.new("coverage") do |rcov|
- rcov.libs << 'lib'
- rcov.pattern = 'test/test_*.rb'
- end
-rescue LoadError
-end
+ENV['CI_REPORTS'] = File.expand_path('./reports', File.dirname(__FILE__))
+task :test => ['ci:setup:testunit', 'test-run']
-Rake::TestTask.new("test") do |test|
+Rake::TestTask.new('test-run') do |test|
test.libs << 'lib'
test.verbose = true
test.test_files = Dir.glob('test/test_*.rb')
View
@@ -1,5 +1,10 @@
# -*- encoding: utf-8 -*-
require 'test/unit'
+require 'simplecov'
+require 'simplecov-rcov'
+SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter
+SimpleCov.start
+
require 'httpclient'
require 'webrick'
require 'webrick/httpproxy.rb'

0 comments on commit 929824b

Please sign in to comment.