From b0e540032d08dff3528f19334d943a064ff6a4bd Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Wed, 8 Mar 2017 16:56:08 +0100 Subject: [PATCH] Added webmock for all rspec tests but enable calls to zammad.com webservices. --- spec/spec_helper.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index db404e9bf..5a2c306a8 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -17,6 +17,7 @@ # # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration require 'spec_helper/zammad_helper' +require 'webmock/rspec' RSpec.configure do |config| # Zammad specific helpers @@ -25,6 +26,9 @@ RSpec.configure do |config| config.before(:suite) do # make sure that all migrations of linked packages are executed Package::Migration.linked + + # allow requests to Zammad webservices + WebMock.disable_net_connect!(allow: /zammad\.com/) end # skip Zammad helper functions in the stacktrace to lower noise