test/test_helper.rb in elasticsearch-api-0.4.7 vs test/test_helper.rb in elasticsearch-api-0.4.8

- old
+ new

@@ -1,19 +1,30 @@ RUBY_1_8 = defined?(RUBY_VERSION) && RUBY_VERSION < '1.9' +JRUBY = defined?(JRUBY_VERSION) if RUBY_1_8 and not ENV['BUNDLE_GEMFILE'] require 'rubygems' gem 'test-unit' end -require 'simplecov' and SimpleCov.start { add_filter "/test|test_/" } if ENV["COVERAGE"] +if ENV['COVERAGE'] && ENV['CI'].nil? && !RUBY_1_8 + require 'simplecov' + SimpleCov.start { add_filter "/test|test_/" } +end +if ENV['CI'] && !RUBY_1_8 + require 'simplecov' + require 'simplecov-rcov' + SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter + SimpleCov.start { add_filter "/test|test_" } +end + require 'test/unit' require 'shoulda-context' require 'mocha/setup' -unless ENV["TM_FILEPATH"] || ENV["NOTURN"] || RUBY_1_8 +unless ENV["NOTURN"] || RUBY_1_8 require 'turn' if ENV['QUIET'] Turn.config.format = :outline Turn.config.trace = 1 @@ -25,10 +36,10 @@ RequireProf.print_timing_infos if ENV["REQUIRE_PROF"] if defined?(RUBY_VERSION) && RUBY_VERSION > '1.9' require 'elasticsearch/extensions/test/cluster' require 'elasticsearch/extensions/test/startup_shutdown' - require 'elasticsearch/extensions/test/profiling' + require 'elasticsearch/extensions/test/profiling' unless JRUBY end module Elasticsearch module Test class FakeClient