Merge pull request #1069 from bf4/coverage

Add test coverage; account for no artifacts on CI
This commit is contained in:
João Moura
2015-09-06 17:58:54 -03:00
5 changed files with 126 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
# https://github.com/colszowka/simplecov/pull/400
# https://github.com/ruby/ruby/blob/trunk/lib/English.rb
unless defined?(English)
# The exception object passed to +raise+.
alias $ERROR_INFO $! # rubocop:disable Style/SpecialGlobalVars
end

View File

@@ -1,5 +1,16 @@
require 'bundler/setup'
begin
require 'simplecov'
# HACK: till https://github.com/colszowka/simplecov/pull/400 is merged and released.
# Otherwise you may get:
# simplecov-0.10.0/lib/simplecov/defaults.rb:50: warning: global variable `$ERROR_INFO' not initialized
require 'support/simplecov'
AppCoverage.start
rescue LoadError
STDERR.puts 'Running without SimpleCov'
end
require 'timecop'
require 'rails'
require 'action_controller'