Sha256: d1c7db50bba4d3f5b7c64b112a6b82c96a0e575dc80694424177a35319508eae

Contents?: true

Size: 595 Bytes

Versions: 5

Compression:

Stored size: 595 Bytes

Contents

# frozen_string_literal: true

module Truemail
  module RSpec
    module AuditorHelper
      def create_auditor(
        success: true,
        current_host_ip: ::Faker::Internet.ip_v4_address,
        warnings: { ip: Truemail::Audit::Ip::IPIFY_ERROR },
        configuration: create_configuration
      )
        Truemail::Auditor.new(configuration: configuration).tap do |auditor|
          auditor_result = auditor.result
          auditor_result.current_host_ip = current_host_ip if success
          auditor_result.warnings = warnings unless success
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
truemail-rspec-0.6.0 lib/truemail/rspec/auditor_helper.rb
truemail-rspec-0.5.0 lib/truemail/rspec/auditor_helper.rb
truemail-rspec-0.4.0 lib/truemail/rspec/auditor_helper.rb
truemail-rspec-0.3.3 lib/truemail/rspec/auditor_helper.rb
truemail-rspec-0.3.2 lib/truemail/rspec/auditor_helper.rb