From d79a6ba514c6625b97e1fc4cb3bc1de85fdc3b54 Mon Sep 17 00:00:00 2001 From: Joe Ferris Date: Fri, 15 Feb 2013 11:48:45 -0500 Subject: [PATCH] Fix test failures from warnings * Some machines print warnings to stderr from plugins * We can't silence these warnings and the tests fail * Tests now look for a specific string instead of any output --- spec/driver_spec.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/spec/driver_spec.rb b/spec/driver_spec.rb index b994ea1..ff5b977 100644 --- a/spec/driver_spec.rb +++ b/spec/driver_spec.rb @@ -2107,15 +2107,17 @@ describe Capybara::Webkit::Driver do describe "logger app" do it "logs nothing before turning on the logger" do visit("/") - log.should == "" + log.should_not include logging_message end it "logs its commands after turning on the logger" do driver.enable_logging visit("/") - log.should_not == "" + log.should include logging_message end + let(:logging_message) { 'Wrote response true' } + let(:driver) do connection = Capybara::Webkit::Connection.new(:stderr => output) browser = Capybara::Webkit::Browser.new(connection)