Question

So I get this error when trying to run a Integration test in TestUnit using Capybara.

It's trying to load the URL at file:///

Any ideas?

# Running:

E

Finished in 1.072113s, 0.9327 runs/s, 0.0000 assertions/s.

  1) Error:
SignInTest#test_user_signs_in_successfully:
Capybara::Webkit::InvalidResponseError: Unable to load URL: file:/// because of error loading file:///: Unknown error
    test/integration/sign_in_test.rb:12:in `block in <class:SignInTest>'

1 runs, 0 assertions, 0 failures, 1 errors, 0 skips
[Finished in 6.2s with exit code 1]
[cmd: ["/usr/local/bin/rbenv exec ruby -Itest test/integration/sign_in_test.rb -n 'test_user_signs_in_successfully'"]]
[dir: /Users/user/code/project]
[path: /usr/bin:/bin:/usr/sbin:/sbin]
Was it helpful?

Solution

Ensure this is in test_helper.rb

require "capybara/rails"
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top