<commit_before>require 'feature_helper'

describe "menu", type: :feature do
  before(:each) do
    category = FactoryGirl.create(:category)
    @item    = Item.find(1)
    visit items_path
  end

  it "shows the items to a user" do
    expect(page).to have_content(@item.title)
  end

  it "has a link to show the item" do
    click_link('Chocolate Dream')
    expect(current_path).to eq(item_path(@item))
  end

  it 'has an add to cart button' do
    within("//table") do
      expect(page).to have_button('Add To Cart')
    end
  end
end<commit_msg>fix items view spec<commit_after>require 'feature_helper'

describe "menu", type: :feature do
  before(:each) do
    category = FactoryGirl.create(:category)
    @item    = Item.find(1)
    visit items_path
  end

  it "shows the items to a user" do
    expect(page).to have_content(@item.title)
  end

  it "has a link to show the item" do
    click_link('Chocolate Dream')
    expect(current_path).to eq(item_path(@item))
  end

  it 'has an add to cart button' do
    expect(page).to have_button('Add To Cart')
  end
end
{'fraction_non_alphanumeric': 0.10790697674418605, 'fraction_numerical': 0.0018604651162790699, 'mean_word_length': 3.3918367346938774, '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': '1441874', 'n_tokens_mistral': 365, 'n_tokens_neox': 354, 'n_words': 115}