debian-mirror-gitlab/features/support/env.rb

37 lines
813 B
Ruby
Raw Normal View History

2016-09-13 17:45:13 +05:30
require './spec/simplecov_env'
SimpleCovEnv.start!
2014-09-02 18:07:02 +05:30
ENV['RAILS_ENV'] = 'test'
require './config/environment'
require 'rspec/expectations'
require 'sidekiq/testing/inline'
2015-09-11 14:41:01 +05:30
require_relative 'capybara'
require_relative 'db_cleaner'
2016-06-02 11:05:42 +05:30
require_relative 'rerun'
2015-09-11 14:41:01 +05:30
if ENV['CI']
require 'knapsack'
2016-08-24 12:49:21 +05:30
Knapsack::Adapters::SpinachAdapter.bind
end
2014-09-02 18:07:02 +05:30
%w(select2_helper test_env repo_helpers).each do |f|
require Rails.root.join('spec', 'support', f)
end
2015-09-11 14:41:01 +05:30
Dir["#{Rails.root}/features/steps/shared/*.rb"].each { |file| require file }
2014-09-02 18:07:02 +05:30
WebMock.allow_net_connect!
Spinach.hooks.before_run do
2015-04-26 12:48:37 +05:30
include RSpec::Mocks::ExampleMethods
2015-09-11 14:41:01 +05:30
RSpec::Mocks.setup
2014-09-02 18:07:02 +05:30
TestEnv.init(mailer: false)
2015-09-25 12:07:36 +05:30
# skip pre-receive hook check so we can use
# web editor and merge
TestEnv.disable_pre_receive
2014-09-02 18:07:02 +05:30
include FactoryGirl::Syntax::Methods
end