<commit_before>require 'spec_helper'

describe PromisesHelper do
  it 'returns the category filter path' do
    helper.category_path_for(stub(id: 1)).should include "/promises?category_id=1"
  end

  it 'returns the category + promise filter path' do
    @party = mock(slug: 'krf')
    helper.category_path_for(stub(id: 1)).should include "/promises?category_id=1&party_slug=krf"
  end

  it 'returns the category + subcategory filter path' do
    @category = stub(id: 1)

    helper.subcategory_path_for(stub(id: 2)).should include "/promises?category_id=1&subcategory_id=2"
  end

  it 'returns the category + subcategory + party filter path' do
    @category = stub(id: 1)
    @party = stub(slug: 'krf')

    helper.subcategory_path_for(stub(id: 2)).should include "/promises?category_id=1&party_slug=krf&subcategory_id=2"
  end

  it 'returns the party filter path' do
    helper.party_path_for(stub(slug: 'krf')).should include "/promises?party_slug=krf"
  end

  it 'returns the party + category filter path' do
    @category = stub(id: 1)
    helper.party_path_for(stub(slug: 'krf')).should include "/promises?category_id=1&party_slug=krf"
  end

  it 'returns the party + category + subcategory filter path' do
    @category = stub(id: 1)
    @subcategory = stub(id: 2)

    helper.party_path_for(stub(slug: 'krf')).should include "/promises?category_id=1&party_slug=krf&subcategory_id=2"
  end

  # TODO: more<commit_msg>More specs.<commit_after>require 'spec_helper'

describe PromisesHelper do
  it 'returns the category filter path' do
    helper.category_path_for(stub(id: 1)).should include "/promises?category_id=1"
  end

  it 'returns the category + promise filter path' do
    @party = mock(slug: 'krf')
    helper.category_path_for(stub(id: 1)).should include "/promises?category_id=1&party_slug=krf"
  end

  it 'returns the category + subcategory filter path' do
    @category = stub(id: 1)

    helper.subcategory_path_for(stub(id: 2)).should include "/promises?category_id=1&subcategory_id=2"
  end

  it 'returns the category + subcategory + party filter path' do
    @category = stub(id: 1)
    @party = stub(slug: 'krf')

    helper.subcategory_path_for(stub(id: 2)).should include "/promises?category_id=1&party_slug=krf&subcategory_id=2"
  end

  it 'returns the party filter path' do
    helper.party_path_for(stub(slug: 'krf')).should include "/promises?party_slug=krf"
  end

  it 'returns the party + category filter path' do
    @category = stub(id: 1)
    helper.party_path_for(stub(slug: 'krf')).should include "/promises?category_id=1&party_slug=krf"
  end

  it 'returns the party + category + subcategory filter path' do
    @category = stub(id: 1)
    @subcategory = stub(id: 2)

    helper.party_path_for(stub(slug: 'krf')).should include "/promises?category_id=1&party_slug=krf&subcategory_id=2"
  end

  it 'returns the party - category filter path' do
    @party    = stub(slug: 'krf')
    @category = stub(id: 1)

    helper.show_all_except_category.should == '/promises?party_slug=krf'
  end

  it 'returns the party + category - subcategory filter path' do
    @party       = stub(slug: 'krf')
    @category    = stub(id: 1)
    @subcategory = stub(id: 2)

    helper.show_all_except_subcategory.should == '/promises?category_id=1&party_slug=krf'
  end

{'fraction_non_alphanumeric': 0.12033949681721734, 'fraction_numerical': 0.012124886329190664, 'mean_word_length': 4.427631578947368, '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': '7642660', 'n_tokens_mistral': 1155, 'n_tokens_neox': 1151, 'n_words': 274}