<commit_before>require 'spec_helper'

describe "SalesEngine invoice extensions", invoice: true do
  context "extensions" do
    describe ".pending" do
      it "returns Invoices without a successful transaction" do
        invoice = engine.invoice_repository.find_by_id(13)
        pending_invoice = engine.invoice_repository.pending

        pending_invoices.map(&:id).include?(invoice).should == true
      end
    end

    describe ".average_revenue" do
      it "returns the average of the totals of each invoice" do
        engine.invoice_repository.average_revenue.should == BigDecimal("12369.53")
      end
    end

    describe ".average_revenue(date)" do
      it "returns the average of the invoice revenues for that date" do
        engine.invoice_repository.average_revenue(Date.parse("March 17, 2012")).should == BigDecimal("11603.14")<commit_msg>Fixes broken invoice extension tests<commit_after>require 'spec_helper'

describe "SalesEngine invoice extensions", invoice: true do
  context "extensions" do
    describe ".pending" do
      it "returns Invoices without a successful transaction" do
        invoice = engine.invoice_repository.find_by_id(13)
        pending_invoices = engine.invoice_repository.pending

        pending_invoices.map(&:id).include?(invoice.id).should == true
      end
    end

    describe ".average_revenue" do
      it "returns the average of the totals of each invoice" do
        engine.invoice_repository.average_revenue.should == BigDecimal("12369.53")
      end
    end

    describe ".average_revenue(date)" do
      it "returns the average of the invoice revenues for that date" do
        engine.invoice_repository.average_revenue(Date.parse("March 17, 2012")).should == BigDecimal("11603.14")
{'fraction_non_alphanumeric': 0.08757870635374929, 'fraction_numerical': 0.025186033199771037, 'mean_word_length': 3.6, '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': '2637952', 'n_tokens_mistral': 540, 'n_tokens_neox': 480, 'n_words': 139}