<commit_before># frozen_string_literal: true
require 'rails_helper'

RSpec.describe 'Course: Assessments: Submissions: Programming Answers' do
  let(:instance) { create(:instance) }

  with_tenant(:instance) do
    let(:course) { create(:course) }
    let(:assessment)do
      create(:course_assessment_assessment, :with_programming_question, course: course)
    end
    before { login_as(user, scope: :user) }

    context 'As a Course Student' do
      let(:user) { create(:course_user, :approved, course: course).user }
      let(:submission) do
        submission = create(:course_assessment_submission, assessment: assessment, user: user)
        assessment.questions.attempt(submission)
        submission
      end

      scenario 'I can save my submission', js: true do<commit_msg>Fix spacing.<commit_after># frozen_string_literal: true
require 'rails_helper'

RSpec.describe 'Course: Assessments: Submissions: Programming Answers' do
  let(:instance) { create(:instance) }

  with_tenant(:instance) do
    let(:course) { create(:course) }
    let(:assessment) do
      create(:course_assessment_assessment, :with_programming_question, course: course)
    end
    before { login_as(user, scope: :user) }

    context 'As a Course Student' do
      let(:user) { create(:course_user, :approved, course: course).user }
      let(:submission) do
        submission = create(:course_assessment_submission, assessment: assessment, user: user)
        assessment.questions.attempt(submission)
        submission
      end

      scenario 'I can save my submission', js: true do
{'fraction_non_alphanumeric': 0.10583016476552598, 'fraction_numerical': 0.0, 'mean_word_length': 4.093548387096774, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2560923', 'n_tokens_mistral': 469, 'n_tokens_neox': 451, 'n_words': 119}