Make stdout deprecation warning more specific

In a Rails application with a large number of dependencies, it's hard to
know which library is emitting a warning. This adds "capybara-webkit" to
the deprecation warning.

Resolves #607.
This commit is contained in:
Mike Perham 2014-01-09 18:00:47 -05:00 committed by Joe Ferris
parent 681aa64bf2
commit 40a5b251d2
1 changed files with 2 additions and 1 deletions

View File

@ -16,7 +16,8 @@ module Capybara::Webkit
if options.has_key?(:stderr)
@output_target = options[:stderr]
elsif options.has_key?(:stdout)
warn "[DEPRECATION] The `stdout` option is deprecated. Please use `stderr` instead."
warn '[DEPRECATION] The Capybara::Webkit::Connection `stdout` option ' \
'is deprecated. Please use `stderr` instead.'
@output_target = options[:stdout]
else
@output_target = $stderr