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