* adding more puts, and waiting longer for tests to start

This commit is contained in:
Seth Call 2014-04-11 02:29:59 +00:00
parent 4e8af1cf32
commit 7c16c5f915
1 changed files with 10 additions and 2 deletions

View File

@ -51,8 +51,9 @@ tests_started = false
Thread.new {
sleep 30
sleep 60
unless tests_started
bputs "tests are hung. exiting..."
puts "tests are hung. exiting..."
exit! 20
end
@ -82,24 +83,31 @@ end
bputs "before websocket thread wait"
Thread.stop
bputs "before conneciton reestablish"
bputs "before connection reestablish"
ActiveRecord::Base.connection.disconnect!
bputs "before connection reestablishing"
ActiveRecord::Base.establish_connection(YAML::load(File.open('config/database.yml'))["test"])
#Spork.prefork do
# Loading more in this block will cause your tests to run faster. However,
# if you change any configuration or code from libraries loaded here, you'll
# need to restart spork for it take effect.
# This file is copied to spec/ when you run 'rails generate rspec:install'
bputs "before load environment"
require File.expand_path("../../config/environment", __FILE__)
bputs "before loading rails"
require 'rspec/rails'
bputs "before connection autorun"
require 'rspec/autorun'
bputs "before load capybara"
require 'capybara'
require 'capybara/rspec'
require 'capybara-screenshot/rspec'
bputs "before load poltergeist"
require 'capybara/poltergeist'
bputs "before register capybara"
Capybara.register_driver :poltergeist do |app|
driver = Capybara::Poltergeist::Driver.new(app, { debug: false, phantomjs_logger: File.open('log/phantomjs.out', 'w') })
end