Commit 2835314c authored by georg's avatar georg

Merge branch '201-introduce-test-coverage' into 'master'

Introduce test coverage and print report to stdout

Closes #201

See merge request schleuder/schleuder!113
parents 0209532b 82594424
......@@ -4,3 +4,4 @@ vendor
db/*.sqlite3
testmails/*
.pc/
coverage/
......@@ -27,12 +27,14 @@ GEM
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
ansi (1.5.0)
arel (6.0.4)
backports (3.6.8)
builder (3.2.2)
daemons (1.2.4)
database_cleaner (1.5.3)
diff-lcs (1.2.5)
docile (1.1.5)
eventmachine (1.2.3)
factory_girl (4.8.0)
activesupport (>= 3.0.0)
......@@ -71,6 +73,15 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0)
rspec-support (3.5.0)
simplecov (0.15.1)
docile (~> 1.1.0)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-console (0.4.2)
ansi
hirb
simplecov
simplecov-html (0.10.2)
sinatra (1.4.8)
rack (~> 1.5)
rack-protection (~> 1.4)
......@@ -101,6 +112,7 @@ DEPENDENCIES
factory_girl
hirb
rspec (~> 3.5.0)
simplecov-console
schleuder!
BUNDLED WITH
......
......@@ -32,6 +32,7 @@ Gem::Specification.new do |s|
s.add_development_dependency 'hirb'
s.add_development_dependency 'factory_girl'
s.add_development_dependency 'database_cleaner'
s.add_development_dependency 'simplecov-console'
s.post_install_message = "
Please consider additionally installing schleuder-cli (allows to
......
......@@ -3,6 +3,15 @@ ENV['SCHLEUDER_CONFIG'] = 'spec/schleuder.yml'
ENV["SCHLEUDER_LIST_DEFAULTS"] = "etc/list-defaults.yml"
require 'bundler/setup'
Bundler.setup
# We need to do this before requiring any other code
# Check env if we want to run code coverage analysis
if ENV['CHECK_CODE_COVERAGE'] != 'false'
require 'simplecov'
require 'simplecov-console'
SimpleCov::Formatter::Console.table_options = {max_width: 400}
SimpleCov.formatter = SimpleCov::Formatter::Console
SimpleCov.start
end
require 'schleuder'
require 'schleuder/cli'
require 'database_cleaner'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment