ensure subsequent cucumber runs don't stomp on each others' simplecov output.

This commit is contained in:
Micah Geisel 2020-05-09 10:30:19 -07:00
parent c72e387c0a
commit a5f9703446
2 changed files with 20 additions and 5 deletions

View file

@ -2,8 +2,15 @@ require "bundler/setup"
require "byebug"
require "rspec/expectations"
orm = ENV['ORM']
another_orm = ENV['ANOTHER_ORM']
strategy = ENV['STRATEGY']
multiple_db = ENV['MULTIPLE_DBS']
if ENV['COVERAGE'] == 'true'
require "simplecov"
simple_cov_key = "Inner Cucumber with #{[orm, another_orm, strategy, multiple_db].compact.join(", ")}"
SimpleCov.command_name simple_cov_key
if ENV['CI'] == 'true'
require 'codecov'
@ -17,11 +24,6 @@ end
DB_DIR = "#{File.dirname(__FILE__)}/../../db"
orm = ENV['ORM']
another_orm = ENV['ANOTHER_ORM']
strategy = ENV['STRATEGY']
multiple_db = ENV['MULTIPLE_DBS']
config = YAML::load(File.open("#{File.dirname(__FILE__)}/../../config/redis.yml"))
ENV['REDIS_URL'] = config['test']['url']
ENV['REDIS_URL_ONE'] = config['one']['url']

View file

@ -1,5 +1,18 @@
require 'rspec/expectations'
if ENV['COVERAGE'] == 'true'
require "simplecov"
if ENV['CI'] == 'true'
require 'codecov'
SimpleCov.formatter = SimpleCov::Formatter::Codecov
puts "required codecov"
end
SimpleCov.start
puts "required simplecov"
end
class FeatureRunner
attr_accessor :orm
attr_accessor :another_orm