<commit_before># require 'rails_helper'
#
# feature "User playing the game" do
#   scenario "when user wins game" do
#     visit '/games/new'
#       allow_any_instance_of(Game).to receive(:computer_throw).and_return("paper")
#       click_button("throw-scissors")
#       expect(page).to have_content("User won!!")
#   end
#
#   scenario "when user loses game" do
#     visit '/games/new'
#       allow_any_instance_of(Game).to receive(:computer_throw).and_return("rock")
#       click_button("throw-scissors")
#       expect(page).to have_content("Computer won!!")
#   end
# end
#
# feature "User visits website" do
#   scenario "sees a list of games and can view them" do
#     game = Game.create(user_throw: "rock", computer_throw: "paper")
#     visit "/"
#     expect(page).to have_content("paper vs. rock Winner: computer")
#   end
#
#   scenario "can start a new game" do
#     visit "/"
#     expect(page).to have_content("New Game")
#   end
# end<commit_msg>add feature spec tests for categories<commit_after>require 'rails_helper'

feature "User navigates to category index page" do
  scenario "when user clicks Categories link on home page" do
    visit '/'
    click_link( "Categories" )
    expect( page ).to have_content( "All Film Categories" )
  end
end

feature "User visits category show page" do
  let( :category ) { Category.create!( title: "Drama" ) }
  scenario "user sees category selections" do
    visit "/categories/#{ category.id }"
    expect( page ).to have_content( "Selections" )
  end

  scenario "user can navigate back to category index page" do
    visit "/categories/#{ category.id }"
    page.find( "#category-back-link" ).click_link( "Categories" )
    expect( page ).to have_content( "All Film Categories" )
  end
end
{'fraction_non_alphanumeric': 0.1263517359134889, 'fraction_numerical': 0.0, 'mean_word_length': 3.663129973474801, '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': '7128124', 'n_tokens_mistral': 557, 'n_tokens_neox': 549, 'n_words': 171}