<commit_before># encoding: UTF-8
require 'spec_helper'

describe ReviewerSessionsController, type: :controller do

  before(:each) do
    @reviewer ||= FactoryGirl.create(:reviewer)
    sign_in @reviewer.user
    disable_authorization
  end

  describe "with view rendering", :render_views => true do
    render_views

    it "index should work" do
      get :index
    end
  end

  it_should_require_login_for_actions :index

  describe "#index" do
    before(:each) do
      @conference = Conference.current
      Conference.stubs(:current).returns(@conference)
      @session = FactoryGirl.build(:session)
      Session.stubs(:for_reviewer).returns(Session)
      Session.stubs(:order).returns(Session)
      Session.stubs(:for_audience_level).returns(Session)
      Session.stubs(:for_session_type).returns(Session)
      Session.stubs(:page).returns([@session])<commit_msg>Fixing specs to deal with include for N+1<commit_after># encoding: UTF-8
require 'spec_helper'

describe ReviewerSessionsController, type: :controller do

  before(:each) do
    @reviewer ||= FactoryGirl.create(:reviewer)
    sign_in @reviewer.user
    disable_authorization
  end

  describe "with view rendering", :render_views => true do
    render_views

    it "index should work" do
      get :index
    end
  end

  it_should_require_login_for_actions :index

  describe "#index" do
    before(:each) do
      @conference = Conference.current
      Conference.stubs(:current).returns(@conference)
      @session = FactoryGirl.build(:session)
      Session.stubs(:for_reviewer).returns(Session)
      Session.stubs(:order).returns(Session)
      Session.stubs(:for_audience_level).returns(Session)
      Session.stubs(:for_session_type).returns(Session)
      Session.stubs(:page).returns(Session)
      Session.stubs(:includes).returns([@session])
{'fraction_non_alphanumeric': 0.10807860262008734, 'fraction_numerical': 0.0016375545851528383, 'mean_word_length': 4.077562326869806, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1366684', 'n_tokens_mistral': 559, 'n_tokens_neox': 541, 'n_words': 111}