Make use of ENV.fetch

This commit is contained in:
Henne Vogelsang 2022-05-06 14:27:15 +02:00
parent 200d188af2
commit 36b23ce25d
No known key found for this signature in database
GPG key ID: 97DDB66BDAF8D4D6
27 changed files with 51 additions and 53 deletions

View file

@ -85,7 +85,7 @@ RSpec.configure do |config|
# use a real browser for JS tests
Capybara.javascript_driver = (
ENV['OSEM_TEST_DRIVER'].try(:to_sym) || :chrome_headless
ENV.fetch('OSEM_TEST_DRIVER', 'chrome_headless').to_sym
)
# Includes helpers and connect them to specific types of tests

View file

@ -1,10 +1,10 @@
RSpec.configure do |config|
# Tracker deprecation messages in each file
if ENV['DEPRECATION_TRACKER']
if ENV.fetch('DEPRECATION_TRACKER', nil)
DeprecationTracker.track_rspec(
config,
shitlist_path: 'spec/support/deprecation_shitlist.json',
mode: ENV['DEPRECATION_TRACKER'],
mode: ENV.fetch('DEPRECATION_TRACKER'),
transform_message: ->(message) { message.gsub("#{Rails.root}/", '') }
)
end