2014-09-03 01:48:44 +04:00
|
|
|
require 'minitest/autorun'
|
|
|
|
require 'minitest/reporters'
|
|
|
|
Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new
|
2013-09-09 22:56:17 +04:00
|
|
|
|
2014-09-03 01:48:44 +04:00
|
|
|
require 'active_support/core_ext/kernel/reporting'
|
2012-05-06 22:50:46 +04:00
|
|
|
|
2014-09-03 03:51:54 +04:00
|
|
|
Dir['test/support/**/*.rb'].each do |file|
|
|
|
|
# strip ^test/ and .rb$
|
|
|
|
file = file[5..-4]
|
|
|
|
require_relative File.join('.', file)
|
2014-09-03 01:48:44 +04:00
|
|
|
end
|
2013-09-09 22:56:17 +04:00
|
|
|
|
2014-09-03 01:48:44 +04:00
|
|
|
GEM_PATH = File.expand_path('../', File.dirname(__FILE__))
|
2013-09-09 22:56:17 +04:00
|
|
|
|
|
|
|
#= Capybara + Poltergeist
|
|
|
|
require 'capybara/poltergeist'
|
2014-06-17 00:40:40 +04:00
|
|
|
|
|
|
|
Capybara.register_driver :poltergeist do |app|
|
|
|
|
Capybara::Poltergeist::Driver.new(
|
|
|
|
app,
|
|
|
|
# inspector: '/Applications/Chromium.app/Contents/MacOS/Chromium', # open in inspector: page.driver.debug
|
|
|
|
window_size: [1280, 1024],
|
2014-09-03 01:48:44 +04:00
|
|
|
timeout: 90,
|
|
|
|
js_errors: true
|
2014-06-17 00:40:40 +04:00
|
|
|
)
|
|
|
|
end
|
|
|
|
|
2013-09-09 22:56:17 +04:00
|
|
|
Capybara.configure do |config|
|
|
|
|
config.app_host = 'http://localhost:7000'
|
|
|
|
config.default_driver = :poltergeist
|
|
|
|
config.javascript_driver = :poltergeist
|
|
|
|
config.server_port = 7000
|
2015-09-27 15:02:04 +03:00
|
|
|
config.default_max_wait_time = 10
|
2013-09-09 22:56:17 +04:00
|
|
|
end
|
2014-06-17 00:40:40 +04:00
|
|
|
|