mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 15:23:06 +00:00
Merge pull request #1069 from bf4/coverage
Add test coverage; account for no artifacts on CI
This commit is contained in:
6
test/support/simplecov.rb
Normal file
6
test/support/simplecov.rb
Normal 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
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user