<commit_before>require 'spec_helper'

describe Gucci do

  before do
    @registration = Gucci::House::Filing.new(300611018,:download_dir=>File.join(File.dirname(__FILE__), 'data'))
    @registration.stubs(:file_path).returns(File.join(File.dirname(__FILE__), 'data', '300611018.xml'))
    @report = Gucci::House::Filing.new(300630565,:download_dir=>File.join(File.dirname(__FILE__), 'data'))
    @report.stubs(:file_path).returns(File.join(File.dirname(__FILE__), 'data', '300630565.xml'))
    @contribution = Gucci::House::Filing.new(700704476,:download_dir=>File.join(File.dirname(__FILE__), 'data'))
    @contribution.stubs(:file_path).returns(File.join(File.dirname(__FILE__), 'data', '700704476.xml'))
  end

  it "should return a report filing object" do
    @filing = Gucci::House::Filing.new(300630565,:download_dir=>File.join(File.dirname(__FILE__), 'data'))
    @filing.should_not be_nil
  end

  describe "#report_summary" do

    it "should return the report mapped summary row" do
      sum = @report.summary
      sum.should be_a_kind_of(Hash)
      sum.clientName.should == "Environmental Defense Action Fund"
    end
  end

  describe "#report_issues" do
<commit_msg>changed contrib file used in filing test<commit_after>require 'spec_helper'

describe Gucci do

  before do
    @registration = Gucci::House::Filing.new(300611018,:download_dir=>File.join(File.dirname(__FILE__), 'data'))
    @registration.stubs(:file_path).returns(File.join(File.dirname(__FILE__), 'data', '300611018.xml'))
    @report = Gucci::House::Filing.new(300630565,:download_dir=>File.join(File.dirname(__FILE__), 'data'))
    @report.stubs(:file_path).returns(File.join(File.dirname(__FILE__), 'data', '300630565.xml'))
    @contribution = Gucci::House::Filing.new(700702169,:download_dir=>File.join(File.dirname(__FILE__), 'data'))
    @contribution.stubs(:file_path).returns(File.join(File.dirname(__FILE__), 'data', '700704476.xml'))
  end

  it "should return a report filing object" do
    @filing = Gucci::House::Filing.new(300630565,:download_dir=>File.join(File.dirname(__FILE__), 'data'))
    @filing.should_not be_nil
  end

  describe "#report_summary" do

    it "should return the report mapped summary row" do
      sum = @report.summary
      sum.should be_a_kind_of(Hash)
      sum.clientName.should == "Environmental Defense Action Fund"
    end
  end

  describe "#report_issues" do

{'fraction_non_alphanumeric': 0.15031315240083507, 'fraction_numerical': 0.05260960334029228, 'mean_word_length': 5.45822102425876, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2230422', 'n_tokens_mistral': 912, 'n_tokens_neox': 802, 'n_words': 138}