<commit_before>require 'rails_spec_helper'

RSpec.describe AttachmentUploader do
end<commit_msg>begin building out AttachmentUploader spec<commit_after>require 'rails_spec_helper'

RSpec.describe AttachmentUploader do
  let(:uploader) { AttachmentUploader.new(model, :file) }
  let(:model) { double(SubmissionFile).as_null_object }

  describe "#course" do
    context "model has a course method" do
      let(:course) { create(:course) }
      before { allow(model).to receive(:course) { course }}

      it "returns a string with the format of <courseno-course_id>" do
        expect(uploader.instance_eval { course }).to eq
      end
    end

    context "model has no course method" do
      it "returns nil" do
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.09152086137281291, 'fraction_numerical': 0.0, 'mean_word_length': 3.738853503184713, 'pattern_counts': {'":': 0, '<': 4, '<?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': '6949065', 'n_tokens_mistral': 229, 'n_tokens_neox': 221, 'n_words': 66}