<commit_before>require 'spec_helper'

describe HomeController do
  let (:user)  {FactoryGirl.create :user}

  render_views

  describe "GET index" do

    it "should be succesful" do
      get :index
      response.should be_success
    end

    it "should work" do
      authenticate_user!(user)
      get :index
      response.should redirect_to(channel_path user, user.graph_user.stream)
    end


    pending "assigns @facts" do
      # We now cache the @facts from the FactHelper
      get :index
      assigns(:facts).should =~ Fact.all.to_a<commit_msg>fixed controller test<commit_after>require 'spec_helper'

describe HomeController do
  let (:user)  {FactoryGirl.create :user}

  render_views

  describe "GET index" do

    it "should be succesful" do
      get :index
      response.should be_success
    end

    it "should work" do
      authenticate_user!(user)
      get :index
      response.should redirect_to(activities_channel_path user, user.graph_user.stream)
    end


    pending "assigns @facts" do
      # We now cache the @facts from the FactHelper
      get :index
      assigns(:facts).should =~ Fact.all.to_a
{'fraction_non_alphanumeric': 0.0773966578715919, 'fraction_numerical': 0.0, 'mean_word_length': 2.9377162629757785, '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': '2970295', 'n_tokens_mistral': 370, 'n_tokens_neox': 339, 'n_words': 105}