Browse Source

Maintenance: Fix tcr to get loaded in tests only so it does not break production environments.

Rolf Schmidt 2 years ago
parent
commit
1e26187ec9
2 changed files with 3 additions and 1 deletions
  1. 1 1
      Gemfile
  2. 2 0
      spec/support/tcr.rb

+ 1 - 1
Gemfile

@@ -214,7 +214,7 @@ group :development, :test do
   gem 'webmock'
 
   # record and replay TCP/HTTP transactions
-  gem 'tcr'
+  gem 'tcr', require: false
   gem 'vcr'
 
   # handle deprecations in core and addons

+ 2 - 0
spec/support/tcr.rb

@@ -1,5 +1,7 @@
 # Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
 
+require 'tcr'
+
 TCR.configure do |config|
   config.cassette_library_dir = 'test/data/tcr_cassettes'
   config.hook_tcp_ports = [389] # LDAP