<commit_before>require "rails_helper"

RSpec.describe EmailStudents, type: :mailer do

  before(:each) do
    ActionMailer::Base.delivery_method = :test
    ActionMailer::Base.perform_deliveries = true
    ActionMailer::Base.deliveries = []
    @user = User.create(:name => "David", :email => "<EMAIL>", :sid => "12345678", :major => "EECS")
    EmailStudents.submit_email(@user).deliver_later
  end
  
  it "should send an email" do
    ActionMailer::Base.deliveries.count.should == 1
  end
  
  it 'renders the receiver email' do
    ActionMailer::Base.deliveries.first.to.should == [@user.email]
  end
    
  it 'should set the subject to the correct subject' do
    ActionMailer::Base.deliveries.first.subject.should == "Don\'t forget to submit team for CS 169"
  end
  
  it 'renders the sender email' do
    ActionMailer::Base.deliveries.first.from.should == ['<EMAIL>']
  end
    
  after(:each) do
    ActionMailer::Base.deliveries.clear
  end
  
end<commit_msg>Fixing rspec tests<commit_after>require "rails_helper"

RSpec.describe EmailStudents, type: :mailer do

  before(:each) do
    ActionMailer::Base.delivery_method = :test
    ActionMailer::Base.perform_deliveries = true
    ActionMailer::Base.deliveries = []
    @user = User.create(:name => "David", :email => "<EMAIL>", :sid => "12345678", :major => "EECS")
    EmailStudents.submit_email(@user).deliver_later
  end
  
  it "should send an email" do
    ActionMailer::Base.deliveries.count.should == 1
  end
  
  it 'renders the receiver email' do
    ActionMailer::Base.deliveries.first.to.should == [@user.email]
  end
    
  it 'should set the subject to the correct subject' do
    ActionMailer::Base.deliveries.first.subject.should == "Don\'t forget to submit team for CS 169"
  end
  
  it 'renders the sender email' do
    ActionMailer::Base.deliveries.first.from.should == ['<EMAIL>']
  end
    
  after(:each) do
    ActionMailer::Base.deliveries.clear
  end
  
end
{'fraction_non_alphanumeric': 0.12544987146529563, 'fraction_numerical': 0.012339331619537276, 'mean_word_length': 3.7579462102689485, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 15, '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': '4894807', 'n_tokens_mistral': 681, 'n_tokens_neox': 648, 'n_words': 155}