<commit_before>ENV['RAILS_ENV'] ||= 'test'

require File.expand_path("../dummy/config/environment.rb",  __FILE__)

require 'warden'
require 'rspec/rails'
require 'factory_girl_rails'
require 'database_cleaner'
require 'faker'
require 'digest'

Warden.test_mode!

# FactoryGirl.find_definitions

Rails.backtrace_cleaner.remove_silencers!

# Load support files
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }

RSpec.configure do |config|
  config.include Warden::Test::ControllerHelpers, type: :controller
  # config.include Warden::Test::Helpers
  config.mock_with :rspec
  config.use_transactional_fixtures = true
  config.infer_base_class_for_anonymous_controllers = false
  config.order = "random"

  def sign_in_member(member)
    # controller.stub(:params).and_return({'member' => {'email' => member.email, 'password' => <PASSWORD>}})
    #
    # warden.authenticate! scope: :member
    member.save if member.new_record?
    warden.set_user member, scope: :diabetic_toolbox__member
    #@request.env['warden'] = warden
  end
end<commit_msg>Removed extraneous code.<commit_after>ENV['RAILS_ENV'] ||= 'test'

require File.expand_path("../dummy/config/environment.rb",  __FILE__)

require 'warden'
require 'rspec/rails'
require 'factory_girl_rails'
require 'database_cleaner'
require 'faker'
require 'digest'

Warden.test_mode!

# FactoryGirl.find_definitions

Rails.backtrace_cleaner.remove_silencers!

# Load support files
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }

RSpec.configure do |config|
  config.include Warden::Test::ControllerHelpers, type: :controller
  config.mock_with :rspec
  config.use_transactional_fixtures = true
  config.infer_base_class_for_anonymous_controllers = false
  config.order = "random"

  def sign_in_member(member)
    member.save if member.new_record?
    warden.set_user member, scope: :diabetic_toolbox__member
  end
end
{'fraction_non_alphanumeric': 0.12709205020920503, 'fraction_numerical': 0.0, 'mean_word_length': 5.735915492957746, 'pattern_counts': {'":': 0, '<': 4, '<?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': '1262056', 'n_tokens_mistral': 656, 'n_tokens_neox': 646, 'n_words': 119}