Sha256: 62b56a60289a4f6eee9468a1ab1d8cac19bc2e47006a9c8c09b436093dbc2a92
Contents?: true
Size: 860 Bytes
Versions: 5
Compression:
Stored size: 860 Bytes
Contents
# frozen_string_literal: true require 'rspec/webservice_matchers/util' require 'rspec/webservice_matchers/redirect_helpers' module RSpec module WebserviceMatchers module RedirectTemporarilyTo RSpec::Matchers.define :redirect_temporarily_to do |expected_location| include RedirectHelpers kind = :temporary status = actual_location = exception = nil match do |url_or_domain_name| begin status, actual_location = redirect_result(url_or_domain_name) redirects_correctly?(status, actual_location, expected_location, kind) rescue Faraday::ConnectionFailed => e exception = e false end end failure_message do redirect_failure_message(exception, status, actual_location, kind) end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems