rails minitest can't configure capybara webkit
asafigan opened this issue · 3 comments
asafigan commented
my test_helper.rb:
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
require "minitest/rails/capybara"
require 'capybara/webkit'
Capybara.javascript_driver = :webkit
Capybara.current_driver = :webkit
Capybara::Webkit.configure do |config|
# Enable debug mode. Prints a log of everything the driver is doing.
config.debug = true
# By default, requests to outside domains (anything besides localhost) will
# result in a warning. Several methods allow you to change this behavior.
# Allow a specific domain without issuing a warning.
config.allow_url(ENV['WEB_SERVICE_DOMAIN'])
config.allow_url(ENV['UPLOAD_DOMAIN'])
# Timeout if requests take longer than 5 seconds
config.timeout = 5
# Don't raise errors when SSL certificates can't be validated
config.ignore_ssl_errors
# Don't load images
# config.skip_image_loading
# Raise JavaScript errors as exceptions
config.raise_javascript_errors = true
end
class ActiveSupport::TestCase
# Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
fixtures :all
# Add more helper methods to be used by all tests here...
end
I get the error:
undefined method `configure' for Capybara::Webkit:Module (NoMethodError)
mhoran commented
Sounds like the version of capybara-webkit you have installed is too old, and doesn't have the configure
block.
asafigan commented
ok, that was right. Bundler downloaded 1.1.0 because it was compatible with that latest version of capybara and the newer versions of this gems aren't. Can the version capybara be bumped up for this gem?
twalpole commented
You can use the current master branch