mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-26 20:41:01 +00:00
24eabf89e6
Changed login field text Changed database configuration connection pool size to be configured via dotenv Use a single BBcode parser library Added better translations coverage Code formatting Increases maximum article text limit Added database cleaner with the deletion strategy during testing
38 lines
1.1 KiB
Ruby
38 lines
1.1 KiB
Ruby
ENV["RAILS_ENV"] ||= 'test'
|
|
|
|
require 'codeclimate-test-reporter'
|
|
require 'simplecov'
|
|
CodeClimate::TestReporter.start
|
|
SimpleCov.start 'rails'
|
|
|
|
require File.expand_path("../../config/environment", __FILE__)
|
|
require 'rspec/rails'
|
|
require 'capybara/rspec'
|
|
require 'capybara/poltergeist'
|
|
|
|
Capybara.register_driver :poltergeist do |app|
|
|
Capybara::Poltergeist::Driver.new(app, :phantomjs_logger => File.open('/dev/null'))
|
|
end
|
|
|
|
Capybara.javascript_driver = :poltergeist
|
|
|
|
Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
|
|
|
|
RSpec.configure do |config|
|
|
config.include FactoryGirl::Syntax::Methods
|
|
config.include Controllers::JsonHelpers, type: :controller
|
|
config.include Features::FormHelpers, type: :feature
|
|
config.include Features::SessionHelpers, type: :feature
|
|
|
|
config.fixture_path = "#{::Rails.root}/spec/fixtures"
|
|
config.order = 'random'
|
|
config.use_transactional_fixtures = false
|
|
|
|
config.before(:each) do
|
|
if example.metadata[:type] == :feature
|
|
Capybara.current_driver = :poltergeist
|
|
else
|
|
Capybara.use_default_driver
|
|
end
|
|
end
|
|
end
|