<commit_before>FactoryGirl.define do
  factory :payment, :class => Spree::Payment do
    amount 45.75
    payment_method { FactoryGirl.create(:bogus_payment_method) }
    source { FactoryGirl.build(:credit_card) }
    order { FactoryGirl.create(:order) }
    state 'pending'
    response_code '12345'

    # limit the payment amount to order's remaining balance, to avoid over-pay exceptions
    after_create do |pmt|
        #pmt.update_attribute(:amount, [pmt.amount, pmt.order.outstanding_balance].min)
    end
  end

  factory :check_payment, :class => Spree::Payment do
    amount 45.75
    payment_method { FactoryGirl.create(:payment_method) }
    order { FactoryGirl.create(:order) }
  end
end<commit_msg>Remove commented out lines from payment factory<commit_after>FactoryGirl.define do
  factory :payment, :class => Spree::Payment do
    amount 45.75
    payment_method { FactoryGirl.create(:bogus_payment_method) }
    source { FactoryGirl.build(:credit_card) }
    order { FactoryGirl.create(:order) }
    state 'pending'
    response_code '12345'

  end

  factory :check_payment, :class => Spree::Payment do
    amount 45.75
    payment_method { FactoryGirl.create(:payment_method) }
    order { FactoryGirl.create(:order) }
  end
end
{'fraction_non_alphanumeric': 0.10176282051282051, 'fraction_numerical': 0.020833333333333332, 'mean_word_length': 4.016064257028113, 'pattern_counts': {'":': 0, '<': 3, '<?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': '7659609', 'n_tokens_mistral': 410, 'n_tokens_neox': 370, 'n_words': 90}