1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00

Don't use Capybara.log anymore, it's not really useful

This commit is contained in:
Jonas Nicklas 2010-07-11 13:11:30 +02:00
parent 0d76d064e9
commit d05cf9b9ec
2 changed files with 2 additions and 11 deletions

View file

@ -13,7 +13,7 @@ module Capybara
class InfiniteRedirectError < TimeoutError; end
class << self
attr_accessor :debug, :asset_root, :app_host, :run_server, :default_host
attr_accessor :asset_root, :app_host, :run_server, :default_host
attr_accessor :default_selector, :default_wait_time, :ignore_hidden_elements
attr_accessor :save_and_open_page_path
@ -24,11 +24,6 @@ module Capybara
def default_wait_time
@default_wait_time ||= 2
end
def log(message)
puts "[capybara] #{message}" if debug
true
end
end
autoload :Server, 'capybara/server'

View file

@ -59,17 +59,13 @@ module Capybara
def boot
return self unless @app
find_available_port
Capybara.log "application has already booted" and return self if responsive?
Capybara.log "booting Rack applicartion on port #{port}"
Thread.new do
handler.run(Identify.new(@app), :Port => port, :AccessLog => [])
end
Capybara.log "checking if application has booted"
Capybara.timeout(10) do
if responsive?
Capybara.log("application has booted")
true
else
sleep 0.5
@ -78,7 +74,7 @@ module Capybara
end
self
rescue Timeout::Error
Capybara.log "Rack application timed out during boot"
puts "Rack application timed out during boot"
exit
end