module Truemail::RSpec::AuditorHelper
Public Instance Methods
create_auditor( success: true, current_host_ip: ::FFaker::Internet.ip_v4_address, warnings: { ip: Truemail::Audit::Ip::IPIFY_ERROR }, configuration: create_configuration )
click to toggle source
# File lib/truemail/rspec/auditor_helper.rb, line 6 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