gitlab-org--gitlab-foss/features/support/env.rb

33 lines
667 B
Ruby
Raw Normal View History

if ENV['SIMPLECOV']
require 'simplecov'
end
if ENV['COVERALLS']
2013-03-10 14:26:27 -04:00
require 'coveralls'
Coveralls.wear_merged!
2013-03-10 14:26:27 -04:00
end
2012-09-10 03:52:43 -04:00
ENV['RAILS_ENV'] = 'test'
require './config/environment'
require 'rspec'
require 'rspec/expectations'
2013-01-09 01:14:05 -05:00
require 'sidekiq/testing/inline'
require_relative 'capybara'
require_relative 'db_cleaner'
%w(select2_helper test_env repo_helpers).each do |f|
require Rails.root.join('spec', 'support', f)
end
Dir["#{Rails.root}/features/steps/shared/*.rb"].each { |file| require file }
2012-09-10 11:35:03 -04:00
WebMock.allow_net_connect!
Spinach.hooks.before_run do
include RSpec::Mocks::ExampleMethods
2014-07-31 12:24:53 -04:00
TestEnv.init(mailer: false)
include FactoryGirl::Syntax::Methods
end