bootstrap-sass/test/test_helper.rb

36 строки
926 B
Ruby
Исходник Обычный вид История

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'
2014-09-03 01:48:44 +04:00
Dir.chdir 'test' do
Dir['support/**/*.rb'].each do |file|
2014-09-03 02:16:29 +04:00
require file[0..-4] # strip .rb suffix
2014-09-03 01:48:44 +04:00
end
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
config.default_wait_time = 10
end
2014-06-17 00:40:40 +04:00