#73 ✓resolved
Zach Dennis

undefined method visits

Reported by Zach Dennis | November 25th, 2008 @ 12:34 PM

Today I upgraded to the latest webrat and got the following issue when running cucumber features. This is using the most current cucumber commit and the most current webrat commit:

undefined method `visits' for #<ActionController::Integration::Session:0x60336ac>

Some other folks in IRC have been experiencing the same issue. Any ideas?

Comments and changes to this ticket

  • gaffo

    gaffo November 25th, 2008 @ 03:47 PM

    I can confirm this as well. The delegate_to_session'd method from methods.rb are not showing up in IntegrationTest::Session so the method missing is not calling over to them.


  • Bryan Helmkamp

    Bryan Helmkamp November 25th, 2008 @ 05:50 PM

    Ack. Here's what you need to add (assuming you're using Rails):

    require "webrat/rails"

    I removed the auto-loading of webrat/rails to make the Webrat mode support (to help with the in-progress Selenium work) work.

    Sorry for the inconvenience.

  • Bryan Helmkamp

    Bryan Helmkamp November 25th, 2008 @ 06:01 PM

    BTW, in the future, for non-backwards compatible changes like this, I'll post alerts to the mailing list:


    ...Just like I'm going to do as soon as I get home from work tonight. :)

    Please subscribe to that list if you use non-release versions of Webrat.



  • gaffo

    gaffo November 25th, 2008 @ 07:10 PM

    that fixed it for me. thanks!

  • Bryan Helmkamp

    Bryan Helmkamp December 1st, 2008 @ 08:24 PM

    • State changed from “new” to “resolved”

    I posted about this change on the mailing list:


    As far as I know, there are no outstanding issues with this, so I'm going to mark it as closed. If anyone experiences Webrat loading issues with the latest code (when using Webrat as either a gem or a plugin), please reopen this.



  • Zach Dennis

    Zach Dennis February 10th, 2009 @ 11:43 AM

    Franciso, what does your env.rb file look like? Do you have Webrat configured?

    Webrat.configure do |config|
      config.mode = :rails
  • gaffo

    gaffo February 10th, 2009 @ 12:59 PM

    change require 'webrat/rails' to require 'webrat'

  • Bryan Helmkamp

    Bryan Helmkamp February 11th, 2009 @ 09:59 AM

    • State changed from “resolved” to “open”

    Francisco -- can you please paste the code from generic_then_steps.rb?

  • Bryan Helmkamp

    Bryan Helmkamp June 14th, 2009 @ 10:18 PM

    • State changed from “open” to “resolved”

    I believe the issue documented here has been resolved in master, so I'm going to go ahead and close this out.

    Francisco -- If you're still seeing issues, can you please open a new ticket and we'll try to help? Please provide your env.rb and the full exception if that's the case. Thanks.



Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Ruby Acceptance Testing for Web applications.

Shared Ticket Bins

People watching this ticket