From 4342bc7b49137a241e381b4eb28cc51dce1834d5 Mon Sep 17 00:00:00 2001 From: roy Date: Thu, 8 Nov 2012 21:11:54 +0100 Subject: [PATCH 1/2] changes for code coverage --- Gemfile | 3 +++ test/test_helper.rb | 2 ++ 2 files changed, 5 insertions(+) diff --git a/Gemfile b/Gemfile index 6fd98a28b..ac23c5664 100644 --- a/Gemfile +++ b/Gemfile @@ -61,3 +61,6 @@ gem 'mysql2' # event machine gem 'eventmachine' gem 'em-websocket' + +# code coverage +gem 'simplecov' diff --git a/test/test_helper.rb b/test/test_helper.rb index 259170548..e0bdaa04a 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,12 +1,14 @@ ENV["RAILS_ENV"] = "test" require File.expand_path('../../config/environment', __FILE__) require 'rails/test_help' +require 'simplecov' class ActiveSupport::TestCase # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order. # # Note: You'll currently still have to declare fixtures explicitly in integration tests # -- they do not yet inherit this setting + SimpleCov.start fixtures :all # load seeds From 3a6f8b9e861c08c30bb48f0e46762ab78ef151b7 Mon Sep 17 00:00:00 2001 From: roy Date: Thu, 8 Nov 2012 21:21:01 +0100 Subject: [PATCH 2/2] added missing gem and configuration for code coverage --- Gemfile | 1 + test/test_helper.rb | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Gemfile b/Gemfile index ac23c5664..e3fa62229 100644 --- a/Gemfile +++ b/Gemfile @@ -64,3 +64,4 @@ gem 'em-websocket' # code coverage gem 'simplecov' +gem 'simplecov-rcov' diff --git a/test/test_helper.rb b/test/test_helper.rb index e0bdaa04a..bb02ae838 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -2,12 +2,14 @@ ENV["RAILS_ENV"] = "test" require File.expand_path('../../config/environment', __FILE__) require 'rails/test_help' require 'simplecov' +require 'simplecov-rcov' class ActiveSupport::TestCase # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order. # # Note: You'll currently still have to declare fixtures explicitly in integration tests # -- they do not yet inherit this setting + SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter SimpleCov.start fixtures :all