NameError: uninitialized constant Capybara :: Webkit.configure

I don't have to get it right where to place this method call. I have this test_helper.rb

file

ENV['RAILS_ENV'] ||= 'test'
require File.expand_path('../../config/environment', __FILE__)

require 'rails/test_help'
require 'minitest/rails/capybara'
require 'capybara'
require 'capybara/rails'
require 'capybara/webkit'

Dir[Rails.root.join('test/support/**/*.rb')].each { |f| require f }

Capybara::Webkit.configure do |config|
  config.allow_unknown_urls
end

      

And I get this error when I run rake test

NoMethodError: undefined method configure' for Capybara::Webkit:Module /Users/sameer/code/rails/door_app/test/test_helper.rb:XX:in

'

It looks like I'm doing what is described in the README on the Capybara-webkit Github page.

+3


source to share


4 answers


It might be a spring

gem version compatibility issue with rspec version. I updated the gem and it was resolved.



+5


source


I had the same problem, fixed by updating capybara-webkit from 1.5.2 to 1.6.0.



+2


source


I had the same problem fixed by restarting the spring server spring stop

. Using capybara-webkit 1.11.1

0


source


You need to install a gem

group :test do
  ...
  gem 'capybara-webkit'

end

      

0


source







All Articles