Thu 30 Dec 2010
undefined method `visit’ for # (NoMethodError)
Posted by kosmas under Cucumber, ruby on rails, Webrat
No Comments
Problem
When using Cucumber and Webrat in a ruby on rails 3 application you see the error: undefined method `visit' for # and your scenario fails.
Solution
Replace the line:
config.mode = :rails
with the line:
config.mode = :rack
in the Webrat.configure block, in your
app/features/support/env.rb
file.