-2

I am using rspec with the capybara-webkit driver for javascript tests.

While having javascripts console.log output is a great feature, for automatic and parallel tests I dont want console.log messing the output. I tried creating the driver with

Capybara.register_driver :webkit_silent do |app|
  Capybara::Driver::Webkit.new(app, :stdout => nil)
end

and using it with either with

Capybara.javascript_driver = :webkit_silent

for all in spec_helper or

Capybara.current_driver = :webkit_silent

for one test, the output is still there. I looked a little into the code and verified stdout was set to null in the connection class.

Is there any other method to stop the output?

  • This does not work anymore. Classes and modules were renamed. In theory, the following should work, but does NOT: `Capybara::Webkit::Driver.new(app, stderr: nil)` It does NOT silence the output. Any ideas what to do? – morgler Jun 17 '13 at 11:03

1 Answers1

-1

shame on me. there was some puts output which confused me, everything is fine and works as expected.