<commit_before>require File.expand_path(File.dirname(__FILE__)+'/../spec_helper')

describe "visiting /" do
  before(:each) do
    @user = Hancock::User.gen
  end
  describe "when authenticated" do
    it "should greet the user" do
      get '/', {}, :session => {:user_id => @user.id}
      @response.body.should match(/Hello #{@user.email}/)
    end
  end
  describe "when unauthenticated" do
    it "should prompt the user to login" do
      get '/'
      @response.body.should be_a_login_form
    end
  end
end<commit_msg>only use get in the landing spec because passing sessions along seems problematic<commit_after>require File.expand_path(File.dirname(__FILE__)+'/../spec_helper')

describe "visiting /" do
  before(:each) do
    @user = Hancock::User.gen
  end
  describe "when authenticated" do
    it "should greet the user" do
      get '/', {}, :session => {:user_id => @user.id}
      @response.body.should match(/Hello #{@user.email}/)
    end
  end
  describe "when unauthenticated" do
    it "should prompt the user to login" do
      visit '/'
      response_body.should be_a_login_form
    end
  end
end
{'fraction_non_alphanumeric': 0.12310437109723461, 'fraction_numerical': 0.0, 'mean_word_length': 3.1865671641791047, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '3382015', 'n_tokens_mistral': 367, 'n_tokens_neox': 351, 'n_words': 105}