<commit_before># This file is copied to spec/ when you run 'rails generate rspec:install'
ENV["RAILS_ENV"] ||= 'test'
require 'simplecov'
require 'coveralls'
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
  SimpleCov::Formatter::HTMLFormatter,
  Coveralls::SimpleCov::Formatter
]
SimpleCov.start do
  add_filter 'config/initializers/rack-attack.rb'
  add_filter 'config/environment.rb'
  add_filter 'config/initializers/mongoid.rb'
end
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
require 'rspec/autorun'
require 'capybara/rails'
require 'webmock/rspec'
require 'vcr'
# ====== PHANTOMJS stuff
require 'capybara/poltergeist'
Capybara.javascript_driver = :poltergeist
Capybara.register_driver :poltergeist do |app|
  Capybara::Poltergeist::Driver.new(app, js_errors: true)
end
# =====
Delayed::Worker.delay_jobs = false
# ===== VCR stuff (records HTTP requests for playback)
VCR.configure do |c|
  c.cassette_library_dir = 'vcr'
  c.hook_into :webmock # or :fakeweb
  c.default_cassette_options = { record: :new_episodes,
                                 match_requests_on: [:host, :method] }
  c.ignore_hosts '127.0.0.1', 'localhost', 'localhost:9200'
end
# =====

Paperclip.options[:log] = false

require 'database_cleaner'
Capybara.javascript_driver = :poltergeist
Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
Mongoid.logger.level = 2
RSpec.configure do |config|
  config.include Devise::TestHelpers, type: :controller
  config.include ApiHelpers, type: :controller
  # If true, the base class of anonymous controllers will be inferred
  # automatically. This will be the default behavior in future versions of
  # rspec-rails.
  config.infer_base_class_for_anonymous_controllers = false

  config.order = "random"
  if ENV['DOCS'] == 'true'
    DocYoSelf.config do |c|
      c.template_file = 'spec/template.md.erb'
      c.output_file   = 'api_docs.md'
    end
<commit_msg>fail fast for faster travis builds<commit_after># This file is copied to spec/ when you run 'rails generate rspec:install'
ENV["RAILS_ENV"] ||= 'test'
require 'simplecov'
require 'coveralls'
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
  SimpleCov::Formatter::HTMLFormatter,
  Coveralls::SimpleCov::Formatter
]
SimpleCov.start do
  add_filter 'config/initializers/rack-attack.rb'
  add_filter 'config/environment.rb'
  add_filter 'config/initializers/mongoid.rb'
end
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
require 'rspec/autorun'
require 'capybara/rails'
require 'webmock/rspec'
require 'vcr'
# ====== PHANTOMJS stuff
require 'capybara/poltergeist'
Capybara.javascript_driver = :poltergeist
Capybara.register_driver :poltergeist do |app|
  Capybara::Poltergeist::Driver.new(app, js_errors: true)
end
# =====
Delayed::Worker.delay_jobs = false
# ===== VCR stuff (records HTTP requests for playback)
VCR.configure do |c|
  c.cassette_library_dir = 'vcr'
  c.hook_into :webmock # or :fakeweb
  c.default_cassette_options = { record: :new_episodes,
                                 match_requests_on: [:host, :method] }
  c.ignore_hosts '127.0.0.1', 'localhost', 'localhost:9200'
end
# =====

Paperclip.options[:log] = false

require 'database_cleaner'
Capybara.javascript_driver = :poltergeist
Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
Mongoid.logger.level = 2
RSpec.configure do |config|
  config.include Devise::TestHelpers, type: :controller
  config.include ApiHelpers, type: :controller
  # If true, the base class of anonymous controllers will be inferred
  # automatically. This will be the default behavior in future versions of
  # rspec-rails.
  config.infer_base_class_for_anonymous_controllers = false
  c.fail_fast = true
  config.order = "random"
  if ENV['DOCS'] == 'true'
    DocYoSelf.config do |c|
      c.template_file = 'spec/template.md.erb'
      c.output_file   = 'api_docs.md'
    end

{'fraction_non_alphanumeric': 0.12724968314321927, 'fraction_numerical': 0.005576679340937896, 'mean_word_length': 4.760583941605839, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7277937', 'n_tokens_mistral': 1367, 'n_tokens_neox': 1335, 'n_words': 305}