mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-27 21:06:49 +00:00
Enable coverage in base_spec_helper
This commit is contained in:
@@ -4,8 +4,9 @@
|
||||
|
||||
ENV["RAILS_ENV"] ||= 'test'
|
||||
|
||||
# for full configuration, see .simplecov
|
||||
require 'simplecov' if ENV["COVERAGE"]
|
||||
require 'rubygems'
|
||||
|
||||
require 'pry' unless ENV['CI']
|
||||
require 'view_component/test_helpers'
|
||||
|
||||
@@ -27,6 +28,12 @@ end
|
||||
require 'knapsack_pro'
|
||||
KnapsackPro::Adapters::RSpecAdapter.bind
|
||||
|
||||
if ENV["COVERAGE"] && defined?(SimpleCov)
|
||||
KnapsackPro::Hooks::Queue.before_queue do
|
||||
SimpleCov.command_name("rspec_ci_node_#{KnapsackPro::Config::Env.ci_node_index}")
|
||||
end
|
||||
end
|
||||
|
||||
# Allow connections to selenium whilst raising errors when connecting to external sites
|
||||
require 'webmock/rspec'
|
||||
WebMock.enable!
|
||||
|
||||
Reference in New Issue
Block a user