<commit_before>describe "the rating process" do
  before :each do
    @submission = FactoryGirl.create(:submission)
  end

  it "signs me in" do
    visit submission_path(@submission)
    click_button '4'
    #expect(page).to have_content 'Success'
  end
end
<commit_msg>Fix rating_spec<commit_after>include Warden::Test::Helpers
Warden.test_mode!
#
# describe "the rating process" do
#   before :each do
#     @submission = FactoryGirl.create(:submission)
#   end
#
#   it "signs me in" do
#     @user = FactoryGirl.create(:user)
#     sign_in @user
#
#     visit submission_path(@submission)
#     click_button '4'
#     #expect(page).to have_content 'Success'
#   end
# end


describe "the rating process" do
  before :each do
    @submission = FactoryGirl.create(:submission)
    user = FactoryGirl.create(:user)
    login_as(user, :scope => :user)
  end

  it "visits submission page, finds and clicks rate button" do
    visit submission_path(@submission)
    click_button '4'
  end
end

Warden.test_reset!

{'fraction_non_alphanumeric': 0.10760118460019744, 'fraction_numerical': 0.0029615004935834156, 'mean_word_length': 3.8056872037914693, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '4412913', 'n_tokens_mistral': 345, 'n_tokens_neox': 334, 'n_words': 91}