<commit_before>require 'rails_helper'

describe "organisations/_form.html.erb", :type => :view do
  before :each do
    @categories_start_with = {what_they_do: 'alligator', who_they_help: 'crocodile', how_they_help: 'iguana'} 
    @organisation = Organisation.new(name: 'Sarah Plain and Tall Foundation')
    @category1 = FactoryGirl.create(:category, name: "alligator",  charity_commission_id: 100)
    @category2 = FactoryGirl.create(:category, name: "crocodile", charity_commission_id: 210)
    @category3 = FactoryGirl.create(:category, name: "iguana", charity_commission_id: 310)
    @category4 = FactoryGirl.create(:category, name: "capybara",  charity_commission_id: 101)
    @category5 = FactoryGirl.create(:category, name: "guinea pig", charity_commission_id: 201)
    @category6 = FactoryGirl.create(:category, name: "rabbit", charity_commission_id: 304)
    @organisation.categories << [@category1, @category3]
    @organisation.save!
    render<commit_msg>spec needs to reference view local<commit_after>require 'rails_helper'

describe "organisations/_form.html.erb", :type => :view do
  before :each do
    @categories_start_with = {what_they_do: 'alligator', who_they_help: 'crocodile', how_they_help: 'iguana'} 
    @organisation = Organisation.new(name: '<NAME> and Tall Foundation')
    @category1 = FactoryGirl.create(:category, name: "alligator",  charity_commission_id: 100)
    @category2 = FactoryGirl.create(:category, name: "crocodile", charity_commission_id: 210)
    @category3 = FactoryGirl.create(:category, name: "iguana", charity_commission_id: 310)
    @category4 = FactoryGirl.create(:category, name: "capybara",  charity_commission_id: 101)
    @category5 = FactoryGirl.create(:category, name: "guinea pig", charity_commission_id: 201)
    @category6 = FactoryGirl.create(:category, name: "rabbit", charity_commission_id: 304)
    @organisation.categories << [@category1, @category3]
    @organisation.save!
    render partial: 'form', locals: {org: @organisation}
{'fraction_non_alphanumeric': 0.12862862862862862, 'fraction_numerical': 0.026026026026026026, 'mean_word_length': 6.038732394366197, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 6, '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': '817042', 'n_tokens_mistral': 687, 'n_tokens_neox': 625, 'n_words': 140}