Sha256: 45ab07b31a35a28d1b4730f3d95ec4e468290a72f5ae7e7242e95bdda90801c7

Contents?: true

Size: 594 Bytes

Versions: 2

Compression:

Stored size: 594 Bytes

Contents

# frozen_string_literal: true

module Truemail
  module RSpec
    module AuditorHelper
      def create_auditor(
        success: true,
        current_host_ip: FFaker::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.2.1 lib/truemail/rspec/auditor_helper.rb
truemail-rspec-0.2.0 lib/truemail/rspec/auditor_helper.rb