<commit_before>ENV["RAILS_ENV"] = "test"
require File.join(File.dirname(__FILE__), 'rails_app', 'config', 'environment')

require 'test_help'
require 'mocha'
require 'webrat'
require File.join(File.dirname(__FILE__), '..', 'lib', 'devise', 'controllers', 'url_helpers')
require File.join(File.dirname(__FILE__), '..', 'lib', 'devise', 'controllers', 'helpers')
ActionView::Base.send :include, Devise::Controllers::UrlHelpers

path = File.join(File.dirname(__FILE__), '..', 'app', 'views')
ActionController::Base.view_paths << path
DeviseMailer.view_paths << path

ActionMailer::Base.delivery_method = :test
ActionMailer::Base.perform_deliveries = true
ActionMailer::Base.default_url_options[:host] = 'test.com'

ActiveRecord::Migration.verbose = false
ActiveRecord::Base.logger = Logger.new(nil)

ActiveRecord::Schema.define(:version => 1) do
  create_table :users do |t|
    t.authenticatable :null => true
    t.string :username
    t.confirmable
    t.invitable

    t.timestamps
  end
end
class User
  devise :invitable
end
ActionController::Routing::Routes.draw do |map|
  map.devise_for :users
end
require File.join(File.dirname(__FILE__), '..', 'app', 'controllers', 'invitations_controller')
InvitationsController.send :include, Devise::Controllers::Helpers

Webrat.configure do |config|
  config.mode = :rails
  config.open_error_files = false
end

class ActiveSupport::TestCase
  self.use_transactional_fixtures = true
  self.use_instantiated_fixtures  = false

  def assert_not(assertion, message = nil)
    assert !assertion, message
  end

  def assert_not_blank(assertion)<commit_msg>add authenticatable so tests have access to new_user_session_path method<commit_after>ENV["RAILS_ENV"] = "test"
require File.join(File.dirname(__FILE__), 'rails_app', 'config', 'environment')

require 'test_help'
require 'mocha'
require 'webrat'
require File.join(File.dirname(__FILE__), '..', 'lib', 'devise', 'controllers', 'url_helpers')
require File.join(File.dirname(__FILE__), '..', 'lib', 'devise', 'controllers', 'helpers')
ActionView::Base.send :include, Devise::Controllers::UrlHelpers

path = File.join(File.dirname(__FILE__), '..', 'app', 'views')
ActionController::Base.view_paths << path
DeviseMailer.view_paths << path

ActionMailer::Base.delivery_method = :test
ActionMailer::Base.perform_deliveries = true
ActionMailer::Base.default_url_options[:host] = 'test.com'

ActiveRecord::Migration.verbose = false
ActiveRecord::Base.logger = Logger.new(nil)

ActiveRecord::Schema.define(:version => 1) do
  create_table :users do |t|
    t.authenticatable :null => true
    t.string :username
    t.confirmable
    t.invitable

    t.timestamps
  end
end
class User
  devise :authenticatable, :invitable
end
ActionController::Routing::Routes.draw do |map|
  map.devise_for :users
end
require File.join(File.dirname(__FILE__), '..', 'app', 'controllers', 'invitations_controller')
InvitationsController.send :include, Devise::Controllers::Helpers

Webrat.configure do |config|
  config.mode = :rails
  config.open_error_files = false
end

class ActiveSupport::TestCase
  self.use_transactional_fixtures = true
  self.use_instantiated_fixtures  = false

  def assert_not(assertion, message = nil)
    assert !assertion, message
  end

  def assert_not_blank(assertion)
{'fraction_non_alphanumeric': 0.13565536205316223, 'fraction_numerical': 0.0006110601894286587, 'mean_word_length': 6.148471615720524, 'pattern_counts': {'":': 0, '<': 11, '<?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': '1160464', 'n_tokens_mistral': 1071, 'n_tokens_neox': 1068, 'n_words': 220}