<commit_before>require 'spec_helper'

module OpenFoodWeb
  describe GroupBuyReport do

    before(:all) do
      @orders = []
      bill_address = create(:address)
      distributor_address = create(:address, :address1 => "distributor address", :city => 'The Shire', :zipcode => "1234")
      distributor = create(:distributor, :pickup_address => distributor_address)

      @supplier1 = create(:supplier)
      @variant1 = create(:variant)
      @variant1.product.supplier = @supplier1
      @variant1.product.save!
      shipping_method = create(:shipping_method)
      product_distribution = create(:product_distribution, :product => @variant1.product, :distributor => distributor, :shipping_method => create(:shipping_method))
      shipping_instructions = "pick up on thursday please!"

      order1 = create(:order, :distributor => distributor, :bill_address => bill_address, :special_instructions => shipping_instructions)
      line_item11 = create(:line_item, :variant => @variant1, :order => order1)
      order1.line_items << line_item11
      @orders << order1

      order2 = create(:order, :distributor => distributor, :bill_address => bill_address, :special_instructions => shipping_instructions)
      line_item21 = create(:line_item, :variant => @variant1, :order => order2)
      order2.line_items << line_item21

      @variant2 = create(:variant)
      @variant2.product.supplier = @supplier1
      @variant2.product.save!
      product_distribution = create(:product_distribution, :product => @variant2.product, :distributor => distributor, :shipping_method => create(:shipping_method))

      line_item22 = create(:line_item, :variant => @variant2, :order => order2)
      order2.line_items << line_item22
      @orders << order2
<commit_msg>Avoid contaminating test data<commit_after>require 'spec_helper'

module OpenFoodWeb
  describe GroupBuyReport do

    before(:each) do
      @orders = []
      bill_address = create(:address)
      distributor_address = create(:address, :address1 => "distributor address", :city => 'The Shire', :zipcode => "1234")
      distributor = create(:distributor, :pickup_address => distributor_address)

      @supplier1 = create(:supplier)
      @variant1 = create(:variant)
      @variant1.product.supplier = @supplier1
      @variant1.product.save!
      shipping_method = create(:shipping_method)
      product_distribution = create(:product_distribution, :product => @variant1.product, :distributor => distributor, :shipping_method => create(:shipping_method))
      shipping_instructions = "pick up on thursday please!"

      order1 = create(:order, :distributor => distributor, :bill_address => bill_address, :special_instructions => shipping_instructions)
      line_item11 = create(:line_item, :variant => @variant1, :order => order1)
      order1.line_items << line_item11
      @orders << order1

      order2 = create(:order, :distributor => distributor, :bill_address => bill_address, :special_instructions => shipping_instructions)
      line_item21 = create(:line_item, :variant => @variant1, :order => order2)
      order2.line_items << line_item21

      @variant2 = create(:variant)
      @variant2.product.supplier = @supplier1
      @variant2.product.save!
      product_distribution = create(:product_distribution, :product => @variant2.product, :distributor => distributor, :shipping_method => create(:shipping_method))

      line_item22 = create(:line_item, :variant => @variant2, :order => order2)
      order2.line_items << line_item22
      @orders << order2

{'fraction_non_alphanumeric': 0.12129760225669958, 'fraction_numerical': 0.0231311706629055, 'mean_word_length': 4.372727272727273, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 47, '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': '5099864', 'n_tokens_mistral': 1069, 'n_tokens_neox': 1003, 'n_words': 215}