Added webmock for all rspec tests but enable calls to zammad.com webservices.

This commit is contained in:
Thorsten Eckel 2017-03-08 16:56:08 +01:00
parent fafe7f3421
commit b0e540032d

View file

@ -17,6 +17,7 @@
# #
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
require 'spec_helper/zammad_helper' require 'spec_helper/zammad_helper'
require 'webmock/rspec'
RSpec.configure do |config| RSpec.configure do |config|
# Zammad specific helpers # Zammad specific helpers
@ -25,6 +26,9 @@ RSpec.configure do |config|
config.before(:suite) do config.before(:suite) do
# make sure that all migrations of linked packages are executed # make sure that all migrations of linked packages are executed
Package::Migration.linked Package::Migration.linked
# allow requests to Zammad webservices
WebMock.disable_net_connect!(allow: /zammad\.com/)
end end
# skip Zammad helper functions in the stacktrace to lower noise # skip Zammad helper functions in the stacktrace to lower noise