<commit_before>require 'capybara'
require 'capybara/dsl'
require_relative 'feature'

module Spinach
  class Feature

    # Spinach's capybara module integrates capybara into all features
    #
    # @example
    #   require 'spinach/capybara'
    #   class CapybaraFeature < Spinach::Feature
    #     Given "I go to the home page" do
    #       visit '/'
    #     end
    #   end
    #
    module Capybara
      def self.included(base)
        base.class_eval do
          include ::Capybara::DSL
          include InstanceMethods

          def after
            ::Capybara.current_session.reset! if ::Capybara.app
          end
        end
      end
      module InstanceMethods
      end
    end
  end
end

Spinach::Feature.send(:include, Spinach::Feature::Capybara)
<commit_msg>Remember to call super in case we overrided the callback<commit_after>require 'capybara'
require 'capybara/dsl'
require_relative 'feature'

module Spinach
  class Feature

    # Spinach's capybara module integrates capybara into all features
    #
    # @example
    #   require 'spinach/capybara'
    #   class CapybaraFeature < Spinach::Feature
    #     Given "I go to the home page" do
    #       visit '/'
    #     end
    #   end
    #
    module Capybara
      def self.included(base)
        base.class_eval do
          include ::Capybara::DSL
          include InstanceMethods

          def after
            super
            ::Capybara.current_session.reset! if ::Capybara.app
          end
        end
      end
      module InstanceMethods
      end
    end
  end
end

Spinach::Feature.send(:include, Spinach::Feature::Capybara)

{'fraction_non_alphanumeric': 0.07357449417535254, 'fraction_numerical': 0.0, 'mean_word_length': 2.120458891013384, 'pattern_counts': {'":': 0, '<': 5, '<?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': '886059', 'n_tokens_mistral': 504, 'n_tokens_neox': 485, 'n_words': 132}