<commit_before>require "spec_helper"

describe "index/index" do
  let(:suites)      { nil }
  let(:meetings)    { nil }
  let(:evaluations) { nil }
  let(:activities)  { nil }

  before(:each) do
    assign(:suites,      suites)
    assign(:meetings,    meetings)
    assign(:evaluations, evaluations)
    assign(:activities,  activities)
    render
  end
  subject { rendered }
  it      { should_not have_selector(".dashboard-table") }

  context "with suites" do
    let(:suites) { create_list(:suite, 2) }
    it           { should have_selector(".dashboard-table tbody tr", count: 2)}
  end
  context "with evaluations" do
    let(:evaluations) { { upcoming: create_list(:suite_evaluation, 2), overdue: create_list(:suite_evaluation, 2) } }
    it                { should have_selector(".dashboard-table tbody tr", count: 6)}
    it                { should have_selector(".dashboard-table tbody th", count: 2)}
  end
  context "with activities" do
    let(:activities) { [ create(:activity, end_date: Date.yesterday, status: :open), create(:activity) ] }
    it               { should have_selector(".dashboard-table tbody tr",        count: 2)}
    it               { should have_selector(".dashboard-table td.main.overdue", count: 1)}
  end
end<commit_msg>Spec fix<commit_after>require "spec_helper"

describe "index/index" do
  let(:suites)      { nil }
  let(:meetings)    { nil }
  let(:evaluations) { nil }
  let(:activities)  { nil }

  before(:each) do
    assign(:suites,      suites)
    assign(:meetings,    meetings)
    assign(:evaluations, evaluations)
    assign(:activities,  activities)
    render
  end
  subject { rendered }
  it      { should_not have_selector(".dashboard-table") }

  context "with suites" do
    let(:suites) { create_list(:suite, 2) }
    it           { should have_selector(".dashboard-table tbody tr", count: 2)}
  end
  context "with evaluations" do
    let(:evaluations) { { upcoming: create_list(:suite_evaluation, 2), overdue: create_list(:suite_evaluation, 2) } }
    it                { should have_selector(".dashboard-table tbody tr", count: 6)}
    it                { should have_selector(".dashboard-table tbody th", count: 2)}
  end
  context "with activities" do
    let(:activities) { [ create(:activity, end_date: Date.yesterday, status: :open), create(:activity) ] }
    it               { should have_selector(".dashboard-table tbody tr",   count: 2)}
    it               { should have_selector(".dashboard-table td.overdue", count: 1)}
  end
end
{'fraction_non_alphanumeric': 0.12863401035444047, 'fraction_numerical': 0.006371963361210673, 'mean_word_length': 2.949685534591195, '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': '4726661', 'n_tokens_mistral': 786, 'n_tokens_neox': 765, 'n_words': 194}