<commit_before># encoding: UTF-8
require 'spec_helper'

require 'rubygems'
require 'nokogiri'

API_SPEC_INITIALIZER = File.expand_path("../initializer.rb", __FILE__)

if File.exist?(API_SPEC_INITIALIZER)

  describe Adyen::API, "with an actual remote connection" do
    before :all do
      require API_SPEC_INITIALIZER
      Net::HTTP.stubbing_enabled = false
      @order_id = @user_id = Time.now.to_i
      perform_payment_request
    end

    after :all do
      Net::HTTP.stubbing_enabled = true
    end

    def perform_payment_request
      @payment_response = Adyen::API.authorise_payment(
        @order_id,
        { :currency => 'EUR', :value => '1234' },
        { :email => <EMAIL>", :reference => @user_id },<commit_msg>Small fixes to functional spec so it will run standalone.<commit_after># encoding: UTF-8
require 'api/spec_helper'
require 'nokogiri'

API_SPEC_INITIALIZER = File.expand_path("../initializer.rb", __FILE__)

if File.exist?(API_SPEC_INITIALIZER)

  describe Adyen::API, "with an actual remote connection" do
    before :all do
      require API_SPEC_INITIALIZER
      Net::HTTP.stubbing_enabled = false
      @order_id = @user_id = Time.now.to_i
      perform_payment_request
    end

    after :all do
      Net::HTTP.stubbing_enabled = true
    end

    def perform_payment_request
      @payment_response = Adyen::API.authorise_payment(
        @order_id,
        { :currency => 'EUR', :value => '1234' },
        { :email => <EMAIL>", :reference => @user_id },
{'fraction_non_alphanumeric': 0.11229946524064172, 'fraction_numerical': 0.0066844919786096255, 'mean_word_length': 3.3900293255131966, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '4122633', 'n_tokens_mistral': 512, 'n_tokens_neox': 495, 'n_words': 113}