Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to instruct phantomjs to avoid timeout when using binding.pry

at some point, I don't know if you guys call it REPL-driven development or something, but I find myself inspecting the contents of my runtime by inserting a binding.pry call in some test. This works pretty well, except when I'm running Cucumber tests because I've chosen poltergeist as my capybara driver, which uses phantomjs. I can get the REPL to launch but after some time it's killed and I get a timeout error from phantomjs, I wonder whether there's a way to fix this, even if it includes switching to pry-remote or similar. This probably had been asked before but I just couldn't find an answer. Clues?

like image 853
blackxored Avatar asked Sep 16 '13 13:09

blackxored


1 Answers

i put this in my spec_helper so i could set the timeout

Capybara.register_driver :poltergeist do |app|
  Capybara::Poltergeist::Driver.new(app, {timeout: 600, js_errors: false} )
end
like image 103
ian root Avatar answered Sep 30 '22 06:09

ian root