<commit_before>require_relative 'spec_helper'
require_relative '../lib/mail_sender'
require_relative '../lib/send_grid_mail_creator'

describe MailSender do

  YAML_HASH = {
    'first' => 'the_worst',
    'second' => 'the_best',
    'third' => 'the_hairy_chest'
     }
    EX = {
      'bob' => 'thebuilder',
      'luke' => 'skywalker'
    }
    COMBINED = {
      'bob' => 'thebuilder',
      'luke' => 'skywalker',
      'first' => 'the_worst',
      'second' => 'the_best',
      'third' => 'the_hairy_chest'
    }
    TO = {
      :to => '<EMAIL>'
      :body => 'this is a test email body message. HEY scott or Dmitri or James'
      :subject => 'test email from hedgeye. is this working? '
    }
  it 'should create the email content from mail_sender' do
    sender = MailSender.new
    hash = sender.create(EX)
    YAML_HASH.each_key do |key|
      YAML_HASH[key].should == hash[key]
    end
  end

  it 'should send an email' do
    sender = MailSender.new
    hash = sender.create(TO)
    sender.send_email
  end<commit_msg>missing comma<commit_after>require_relative 'spec_helper'
require_relative '../lib/mail_sender'
require_relative '../lib/send_grid_mail_creator'

describe MailSender do

  YAML_HASH = {
    'first' => 'the_worst',
    'second' => 'the_best',
    'third' => 'the_hairy_chest'
     }
    EX = {
      'bob' => 'thebuilder',
      'luke' => 'skywalker'
    }
    COMBINED = {
      'bob' => 'thebuilder',
      'luke' => 'skywalker',
      'first' => 'the_worst',
      'second' => 'the_best',
      'third' => 'the_hairy_chest'
    }
    TO = {
      :to => '<EMAIL>',
      :body => 'this is a test email body message. HEY scott or Dmitri or James',
      :subject => 'test email from hedgeye. is this working? '
    }
  it 'should create the email content from mail_sender' do
    sender = MailSender.new
    hash = sender.create(EX)
    YAML_HASH.each_key do |key|
      YAML_HASH[key].should == hash[key]
    end
  end

  it 'should send an email' do
    sender = MailSender.new
    hash = sender.create(TO)
    sender.send_email
  end
{'fraction_non_alphanumeric': 0.138996138996139, 'fraction_numerical': 0.0, 'mean_word_length': 2.636842105263158, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 31, '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': '2610122', 'n_tokens_mistral': 753, 'n_tokens_neox': 738, 'n_words': 178}