<commit_before>#spec/controllers/current_courses_controller_spec.rb
require 'spec_helper'

describe CurrentCoursesController do

	before do
    @course = create(:course)
    @course_2 = create(:course)
    @user = create(:user)
    @user.courses << [@course, @course_2]

    login_user(@user)
    session[:course_id] = @course.id
    allow(Resque).to receive(:enqueue).and_return(true)
  end

  describe "POST change" do
  	it "switches the course context" do
	  	post :change, :course_id => @course_2.id
	  	expect(response).to redirect_to(root_url)
	  	expect(session[:course_id]).to eq(@course_2.id)
	  end
	end

end
<commit_msg>Removed some unnecessary instance variables<commit_after>require 'spec_helper'

describe CurrentCoursesController do
  before do
    course = create(:course)
    @course_2 = create(:course)
    user = create(:user)
    user.courses << [course, @course_2]

    login_user(user)
    session[:course_id] = course.id
    allow(Resque).to receive(:enqueue).and_return(true)
  end

  describe "POST change" do
    it "switches the course context" do
      post :change, :course_id => @course_2.id
      expect(response).to redirect_to(root_url)
      expect(session[:course_id]).to eq(@course_2.id)
    end
  end

end

{'fraction_non_alphanumeric': 0.1157556270096463, 'fraction_numerical': 0.006430868167202572, 'mean_word_length': 4.060975609756097, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '3865791', 'n_tokens_mistral': 423, 'n_tokens_neox': 410, 'n_words': 91}