3

I've upgraded to Rails 4.0.0 from Rails 3.2.13. I fixed all the deprecation warnings (except for secret_base_key), upgraded database_cleaner, rspec, rspec-rails, capybara, selenium-webdriver and poltergeist to the latest versions.

Now, when I run my specs, through rake or rspec, the output of rspec eventually hangs, always on a feature test (a javascript one). The output of test.log is clear: the tests are still running, but the console is not getting any updates.

I am using:

  • phantomjs 1.9.2.
  • poltergeist 1.4.1

Thoughts on how I can get my test suite to behave normally again?

Trevoke
  • 4,115
  • 1
  • 27
  • 48

1 Answers1

6

I had the same problem, but with capybara-webkit.

I found the solution here: webkit_server hangs periodically when run from Capybara in Ruby

# Gemfile
group :test do
  gem 'thin'
end

# spec_helper.rb
Capybara.javascript_driver = :webkit
Capybara.server do |app, port|
  require 'rack/handler/thin'
  Rack::Handler::Thin.run(app, :Port => port)
end
Community
  • 1
  • 1
Lasse Skindstad Ebert
  • 3,370
  • 2
  • 29
  • 28
  • great solution.. have you found a way to silence the test startup though? I'm now getting Thin noise http://d.pr/i/N7dh – noli Jan 19 '14 at 10:25
  • 1
    No, I also get the noise inside my spec output. Mine is not as visible, as I run rspec with "-f doc" parameter (see what that means here: https://www.relishapp.com/rspec/rspec-core/v/2-6/docs/command-line/format-option#documentation-format) – Lasse Skindstad Ebert Jan 19 '14 at 21:14