From 77168fd29d8cbb3104c4fc2fdb58532a3d0cfeb9 Mon Sep 17 00:00:00 2001 From: snusnu Date: Wed, 13 May 2009 05:01:19 +0200 Subject: [PATCH] only require silence_stream if active_support hasn't already defined it --- lib/webrat/selenium.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/webrat/selenium.rb b/lib/webrat/selenium.rb index d47c583..2564645 100644 --- a/lib/webrat/selenium.rb +++ b/lib/webrat/selenium.rb @@ -1,7 +1,13 @@ require "webrat" gem "selenium-client", ">=1.2.14" require "selenium/client" -require "webrat/selenium/silence_stream" + +# active_support already defines silence_stream, no need to do that again if it's already present. +# http://github.com/rails/rails/blob/master/activesupport/lib/active_support/core_ext/kernel/reporting.rb +unless Kernel.respond_to?(:silence_stream) + require "webrat/selenium/silence_stream" +end + require "webrat/selenium/selenium_session" require "webrat/selenium/matchers" require "webrat/core_extensions/tcp_socket"