Sha256: 2a75f9a6b61163c594de413bb02512ac317ffc7fba546afbb8372f79a664325b

Contents?: true

Size: 593 Bytes

Versions: 2

Compression:

Stored size: 593 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

2 entries across 2 versions & 1 rubygems

Version Path
truemail-rspec-0.3.1 lib/truemail/rspec/auditor_helper.rb
truemail-rspec-0.3.0 lib/truemail/rspec/auditor_helper.rb