<commit_before>require 'spec_helper'

describe 'Dashboard' do
  let(:user) { create :user }
  subject { page }

  before do
    login user
  end

  context 'when the user has not set their email preferences' do
    before do
      visit dashboard_path
    end

    specify { current_path.should eq email_path }
  end

  context 'when the user has set their email preferences' do
    before do
      user.email_frequency = 'daily'
      user.save!
      visit dashboard_path
    end

    it { should have_content "Welcome back #{user.nickname}" }

    context 'when the user has not sent any pull requests' do
      it { should have_content "You've not sent any pull requests, what are you waiting for?!" }
    end<commit_msg>Fixed dashboard spec<commit_after>require 'spec_helper'

describe 'Dashboard' do
  let(:user) { create :user }
  subject { page }

  before do
    login user
  end

  context 'when the user has not set their email preferences' do
    before do
      visit dashboard_path
    end

    specify { current_path.should eq email_path }
  end

  context 'when the user has set their email preferences' do
    before do
      user.email_frequency = 'daily'
      user.save!
      visit dashboard_path
    end

    it { should have_content "Welcome back, #{user.nickname}" }

    context 'when the user has not sent any pull requests' do
      it { should have_content "You've not sent any pull requests, what are you waiting for?!" }
    end
{'fraction_non_alphanumeric': 0.06378600823045268, 'fraction_numerical': 0.0, 'mean_word_length': 2.870026525198939, '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': '498512', 'n_tokens_mistral': 429, 'n_tokens_neox': 407, 'n_words': 173}