Webrat: no such file to load — action_controller/integration
When using rspec + webrat for unit testing, always pop up the error on the line: visit(edit_users_path)
Failure/Error: visit('/users/edit')
LoadError:
no such file to load -- action_controller/integration
If you confirmed that you have no problem with your routes.rb
The quick fix is go to spec_helper.rb
require "webrat" require 'webrat/core/matchers' include Webrat::Methods Webrat.configure do |config| config.mode = :rack end
and instead of :rails as default, here we use :rack