<commit_before>require 'rails_helper'

describe "browse crops" do
  let(:tomato)         { create :tomato        }
  let(:maize)          { create :maize         }
  let(:pending_crop)   { create :crop_request  }
  let(:rejected_crop)  { create :rejected_crop }

  it "has a form for sorting by" do
    visit crops_path
    expect(page).to have_css "select#sort"
  end

  it "shows a list of crops" do
    crop1 = tomato
    visit crops_path
    expect(page).to have_content crop1.name
  end

  it "pending crops are not listed" do
    visit crops_path
    expect(page).not_to have_content pending_crop.name
  end

  it "rejected crops are not listed" do
    visit crops_path
    expect(page).not_to have_content rejected_crop.name
  end
end<commit_msg>get specs for browsing crops working<commit_after>require 'rails_helper'

describe "browse crops" do
  let!(:tomato)         { FactoryBot.create :tomato        }
  let!(:maize)          { FactoryBot.create :maize         }
  let!(:pending_crop)   { FactoryBot.create :crop_request  }
  let!(:rejected_crop)  { FactoryBot.create :rejected_crop }

  it "has a form for sorting by" do
    visit crops_path
    expect(page).to have_css "select#sort"
  end

  it "shows a list of crops" do
    crop1 = tomato
    visit crops_path
    expect(page).to have_content crop1.name
  end

  it "pending crops are not listed" do
    visit crops_path
    expect(page).not_to have_content pending_crop.name
  end

  it "rejected crops are not listed" do
    visit crops_path
    expect(page).not_to have_content rejected_crop.name
  end
end
{'fraction_non_alphanumeric': 0.07863031071655041, 'fraction_numerical': 0.0025364616360177552, 'mean_word_length': 3.046153846153846, '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': '7046036', 'n_tokens_mistral': 538, 'n_tokens_neox': 519, 'n_words': 152}