BigW Consortium Gitlab

env.rb 774 Bytes
Newer Older
1 2 3
if ENV['SIMPLECOV']
  require 'simplecov'
end
4

5
if ENV['COVERALLS']
6
  require 'coveralls'
7
  Coveralls.wear_merged!
8 9
end

10 11
ENV['RAILS_ENV'] = 'test'
require './config/environment'
12
require 'rspec/expectations'
13 14
require 'sidekiq/testing/inline'

15 16 17
require_relative 'capybara'
require_relative 'db_cleaner'

18
%w(select2_helper test_env repo_helpers).each do |f|
19 20 21
  require Rails.root.join('spec', 'support', f)
end

22
Dir["#{Rails.root}/features/steps/shared/*.rb"].each { |file| require file }
Nihad Abbasov committed
23

24 25 26
WebMock.allow_net_connect!

Spinach.hooks.before_run do
27
  include RSpec::Mocks::ExampleMethods
28
  RSpec::Mocks.setup
29
  TestEnv.init(mailer: false)
30

31 32 33 34
  # skip pre-receive hook check so we can use
  # web editor and merge
  TestEnv.disable_pre_receive

35
  include FactoryGirl::Syntax::Methods
36
end