[ARVADOS] created: 6a7ffd91ec95950588b95d3f29599d07d8447c16

git at public.curoverse.com git at public.curoverse.com
Sat May 3 00:44:30 EDT 2014


        at  6a7ffd91ec95950588b95d3f29599d07d8447c16 (commit)


commit 6a7ffd91ec95950588b95d3f29599d07d8447c16
Author: Tom Clegg <tom at curoverse.com>
Date:   Sat May 3 00:44:12 2014 -0400

    Generate test coverage reports with SimpleCov.

diff --git a/apps/workbench/.gitignore b/apps/workbench/.gitignore
index afb317b..8502e95 100644
--- a/apps/workbench/.gitignore
+++ b/apps/workbench/.gitignore
@@ -28,3 +28,6 @@
 
 # This can be a symlink to ../../../doc/.site in dev setups
 /public/doc
+
+# SimpleCov reports
+/coverage
diff --git a/apps/workbench/Gemfile b/apps/workbench/Gemfile
index ee43a89..add8693 100644
--- a/apps/workbench/Gemfile
+++ b/apps/workbench/Gemfile
@@ -29,6 +29,7 @@ group :test do
   gem 'capybara'
   gem 'poltergeist'
   gem 'headless'
+  gem 'simplecov', '~> 0.7.1', require: false
 end
 
 gem 'jquery-rails'
diff --git a/apps/workbench/Gemfile.lock b/apps/workbench/Gemfile.lock
index e1e2b81..ad2655f 100644
--- a/apps/workbench/Gemfile.lock
+++ b/apps/workbench/Gemfile.lock
@@ -149,6 +149,10 @@ GEM
       multi_json (~> 1.0)
       rubyzip (~> 1.0)
       websocket (~> 1.0.4)
+    simplecov (0.7.1)
+      multi_json (~> 1.0)
+      simplecov-html (~> 0.7.1)
+    simplecov-html (0.7.1)
     sprockets (2.2.2)
       hike (~> 1.2)
       multi_json (~> 1.0)
@@ -200,6 +204,7 @@ DEPENDENCIES
   sass
   sass-rails (~> 3.2.0)
   selenium-webdriver
+  simplecov (~> 0.7.1)
   sqlite3
   themes_for_rails
   therubyracer
diff --git a/apps/workbench/test/test_helper.rb b/apps/workbench/test/test_helper.rb
index cbbf562..ba6621b 100644
--- a/apps/workbench/test/test_helper.rb
+++ b/apps/workbench/test/test_helper.rb
@@ -1,4 +1,7 @@
 ENV["RAILS_ENV"] = "test"
+require 'simplecov'
+SimpleCov.start
+
 require File.expand_path('../../config/environment', __FILE__)
 require 'rails/test_help'
 
@@ -70,6 +73,7 @@ class ApiServerBackedTestRunner < MiniTest::Unit
   def _run(args=[])
     Capybara.javascript_driver = :poltergeist
     server_pid = Dir.chdir($ARV_API_SERVER_DIR) do |apidir|
+      ENV["NO_COVERAGE_TEST"] = "1"
       _system('bundle', 'exec', 'rake', 'db:test:load')
       _system('bundle', 'exec', 'rake', 'db:fixtures:load')
       _system('bundle', 'exec', 'rails', 'server', '-d')
diff --git a/services/api/.gitignore b/services/api/.gitignore
index 1b76c64..c286717 100644
--- a/services/api/.gitignore
+++ b/services/api/.gitignore
@@ -22,3 +22,5 @@
 /Capfile*
 /config/deploy*
 
+# SimpleCov reports
+/coverage
diff --git a/services/api/Gemfile b/services/api/Gemfile
index 3b715d3..fc0a38e 100644
--- a/services/api/Gemfile
+++ b/services/api/Gemfile
@@ -7,6 +7,7 @@ gem 'rails', '~> 3.2.0'
 
 group :test, :development do
   gem 'sqlite3'
+  gem 'simplecov', '~> 0.7.1', require: false
 end
 
 # This might not be needed in :test and :development, but we load it
diff --git a/services/api/Gemfile.lock b/services/api/Gemfile.lock
index d00e681..21af64a 100644
--- a/services/api/Gemfile.lock
+++ b/services/api/Gemfile.lock
@@ -175,6 +175,10 @@ GEM
       faraday (~> 0.8.1)
       jwt (>= 0.1.5)
       multi_json (>= 1.0.0)
+    simplecov (0.7.1)
+      multi_json (~> 1.0)
+      simplecov-html (~> 0.7.1)
+    simplecov-html (0.7.1)
     sprockets (2.2.2)
       hike (~> 1.2)
       multi_json (~> 1.0)
@@ -222,6 +226,7 @@ DEPENDENCIES
   redis
   rvm-capistrano
   sass-rails (>= 3.2.0)
+  simplecov (~> 0.7.1)
   sqlite3
   test_after_commit
   themes_for_rails
diff --git a/services/api/test/test_helper.rb b/services/api/test/test_helper.rb
index 1bd1b51..ee4d4cc 100644
--- a/services/api/test/test_helper.rb
+++ b/services/api/test/test_helper.rb
@@ -1,4 +1,9 @@
 ENV["RAILS_ENV"] = "test"
+unless ENV["NO_COVERAGE_TEST"]
+  require 'simplecov'
+  SimpleCov.start
+end
+
 require File.expand_path('../../config/environment', __FILE__)
 require 'rails/test_help'
 

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list