<commit_before>require "rails_helper"

feature "Polls" do

  context "Public index" do
    it "Budget polls should not be listed" do
      poll = create(:poll)
      budget_poll = create(:poll, budget: create(:budget))

      visit polls_path

      expect(page).to have_content(poll.name)
      expect(page).not_to have_content(budget_poll.name)
    end
  end

  context "Admin index" do
    it "Budget polls should not appear in the list" do
      login_as(create(:administrator).user)

      poll = create(:poll)
      budget_poll = create(:poll, budget: create(:budget))

      visit admin_polls_path

      expect(page).to have_content(poll.name)
      expect(page).not_to have_content(budget_poll.name)
    end
  end

end<commit_msg>Use `scenario` instead of `it` in feature specs<commit_after>require "rails_helper"

feature "Polls" do

  context "Public index" do

    scenario "Budget polls should not be listed" do
      poll = create(:poll)
      budget_poll = create(:poll, budget: create(:budget))

      visit polls_path

      expect(page).to have_content(poll.name)
      expect(page).not_to have_content(budget_poll.name)
    end

  end

  context "Admin index" do

    scenario "Budget polls should not appear in the list" do
      login_as(create(:administrator).user)

      poll = create(:poll)
      budget_poll = create(:poll, budget: create(:budget))

      visit admin_polls_path

      expect(page).to have_content(poll.name)
      expect(page).not_to have_content(budget_poll.name)
    end
  end

end
{'fraction_non_alphanumeric': 0.09561231172233137, 'fraction_numerical': 0.0, 'mean_word_length': 3.304225352112676, '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': '6188937', 'n_tokens_mistral': 503, 'n_tokens_neox': 478, 'n_words': 128}