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
|
|
|
|
2016-06-16 23:09:34 +05:30
|
|
|
if ENV['CI']
|
|
|
|
require 'knapsack'
|
2016-08-24 12:49:21 +05:30
|
|
|
Knapsack::Adapters::SpinachAdapter.bind
|
2016-06-16 23:09:34 +05:30
|
|
|
end
|
|
|
|
|
2016-11-03 12:29:30 +05:30
|
|
|
%w(select2_helper test_env repo_helpers wait_for_ajax).each do |f|
|
2014-09-02 18:07:02 +05:30
|
|
|
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
|