<commit_before># encoding: UTF-8

require 'net/smtp'

module Helpers
  # Test helpers to send emails via SMTP
  module PostfixDovecotTest
    include MiniTest::Chef::Assertions
    include MiniTest::Chef::Context
    include MiniTest::Chef::Resources

    TEMPLATE <<-EOM
From: #{from}
To: #{to}
Subject: Some cool subject for testing

A blackhole email body.

EOM

    def send_test_mail(from, to)
      Net::SMTP.start('localhost', 25) do |smtp|
        smtp.send_message(
          TEMPLATE,
          from,
          to
        )
      end
    end
  end
end<commit_msg>minitest test mail template fixed<commit_after># encoding: UTF-8

require 'net/smtp'

module Helpers
  # Test helpers to send emails via SMTP
  module PostfixDovecotTest
    include MiniTest::Chef::Assertions
    include MiniTest::Chef::Context
    include MiniTest::Chef::Resources

    def template(from, to)
      <<-EOM
From: #{from}
To: #{to}
Subject: Some cool subject for testing

A blackhole email body.

EOM
    end

    def send_test_mail(from, to)
      Net::SMTP.start('localhost', 25) do |smtp|
        smtp.send_message(
          template(from, to),
          from,
          to
        )
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.09302325581395349, 'fraction_numerical': 0.0049833887043189366, 'mean_word_length': 2.662613981762918, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7253623', 'n_tokens_mistral': 412, 'n_tokens_neox': 393, 'n_words': 115}