mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 11:44:02 +00:00
Make use of ENV.fetch
This commit is contained in:
parent
200d188af2
commit
36b23ce25d
27 changed files with 51 additions and 53 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue