Tuesday, July 27, 2010

undefined method `visit' for cucumber

Fix: Include the following configuration in features/support/env.rb

require 'webrat'
require 'webrat/core/matchers'

Webrat.configure do |config|
config.mode = :rack
config.open_error_files = false # Set to true if you want error pages to pop up in the browser
end

World(Webrat::Methods)
World(Webrat::Matchers)

This also fixes the error : "no such file to load -- action_controller/integration"