<commit_before>require File.dirname(__FILE__) + '/../test_helper'

class BudgetTest < ActiveSupport::TestCase
  should_have_valid_fixtures
  should_require_attributes :family_id, :account_id
  should_only_allow_numeric_values_for :amount
  should_protect_attributes :family_id, :account_id
  should_allow_attributes :family, :account, :year, :month

  context "A budget" do
    setup do
      @budget = families(:beausoleil).budgets.build(:account => accounts(:cell_phone_service), :amount => 200)
    end

    context "with year and month" do
      setup do
        @budget.year   = 2009
        @budget.month  = 7
      end

      context "on save" do<commit_msg>Ensure budgets.starting_on is attr_protected<commit_after>require File.dirname(__FILE__) + '/../test_helper'

class BudgetTest < ActiveSupport::TestCase
  should_have_valid_fixtures
  should_require_attributes :family_id, :account_id
  should_only_allow_numeric_values_for :amount
  should_protect_attributes :family_id, :account_id, :starting_on
  should_allow_attributes :family, :account, :year, :month

  context "A budget" do
    setup do
      @budget = families(:beausoleil).budgets.build(:account => accounts(:cell_phone_service), :amount => 200)
    end

    context "with year and month" do
      setup do
        @budget.year   = 2009
        @budget.month  = 7
      end

      context "on save" do
{'fraction_non_alphanumeric': 0.09090909090909091, 'fraction_numerical': 0.011636363636363636, 'mean_word_length': 3.9855072463768115, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '4005509', 'n_tokens_mistral': 445, 'n_tokens_neox': 416, 'n_words': 101}