<commit_before>module WatirSpec
  module SpecHelper

    module BrowserHelper
      def browser; @browser; end
    end

    module PersistentBrowserHelper
      def browser; $browser; end
    end

    module MessagesHelper
      def messages
        browser.div(:id, 'messages').divs.map { |d| d.text }
      end
    end

    module_function

    def execute
      load_requires
      configure
      start_server
      add_guard_hook
    end

    def configure
      Thread.abort_on_exception = true

      Spec::Runner.configure do |config|<commit_msg>Avoid forked process accidentaly closing the browser<commit_after>module WatirSpec
  module SpecHelper

    module BrowserHelper
      def browser; @browser; end
    end

    module PersistentBrowserHelper
      def browser; $browser; end
    end

    module MessagesHelper
      def messages
        browser.div(:id, 'messages').divs.map { |d| d.text }
      end
    end

    module_function

    def execute
      load_requires
      start_server
      configure
      add_guard_hook
    end

    def configure
      Thread.abort_on_exception = true

      Spec::Runner.configure do |config|
{'fraction_non_alphanumeric': 0.05231037489102005, 'fraction_numerical': 0.0, 'mean_word_length': 2.3469387755102042, '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': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '502464', 'n_tokens_mistral': 328, 'n_tokens_neox': 310, 'n_words': 91}