summaryrefslogtreecommitdiffstats
path: root/test/test_helper.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-12-02 19:59:38 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-12-02 19:59:38 +0000
commitc3ba302f0de630d9872efb3eeb1b9437f56b5448 (patch)
treed99a2be556383e256d71bd22c0fe8bace5ecbb5a /test/test_helper.rb
parentf4010f30185bb7be78c11af76d18b81725b06992 (diff)
downloadredmine-c3ba302f0de630d9872efb3eeb1b9437f56b5448.tar.gz
redmine-c3ba302f0de630d9872efb3eeb1b9437f56b5448.zip
Use simplecov for code coverage, rcov does not support ruby>=1.9.
git-svn-id: http://svn.redmine.org/redmine/trunk@13691 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/test_helper.rb')
-rw-r--r--test/test_helper.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/test_helper.rb b/test/test_helper.rb
index 1eb2c7a34..72c064386 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -15,6 +15,13 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+if ENV["COVERAGE"]
+ require 'simplecov'
+ require File.expand_path(File.dirname(__FILE__) + "/coverage/html_formatter")
+ SimpleCov.formatter = Redmine::Coverage::HtmlFormatter
+ SimpleCov.start 'rails'
+end
+
ENV["RAILS_ENV"] = "test"
require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
require 'rails/test_help'