#150 ✓out-of-date
Joe Van Dyk

multiple session support

Reported by Joe Van Dyk | February 1st, 2009 @ 11:16 PM

I had been doing something like this in an earlier version of webrat:


def login_as user
  session = ActionController::Integration::Session.new
  session.visit '/"
  # session does steps to login
  return session
end

def test_do_stuff
  bob = login_as(:bob)
  jim = login_as(:jim)
  bob.go_do_stuff
  jim.go_do_other_stuff
  # test interaction
end

Recently, webrat doesn't seem to add its methods to the the Session class anymore. So I get messages like "method 'visit' undefined" when doing session.visit.

Comments and changes to this ticket

  • Bryan Helmkamp

    Bryan Helmkamp February 8th, 2009 @ 11:45 PM

    • Tag set to featurerequest
    • State changed from “new” to “open”

    Thanks for the report, Joe.

    The next step on this ticket is to figure out what API for multiple sessions Webrat should support, I think. Ideally, it would not be dependent on the underlying framework, so it can be the same with Rails, Merb, Rails+Selenium, Mechanize, etc.

    Then, making that work in the various environments may be tricky.

    WDYT?

  • gaffo

    gaffo June 3rd, 2009 @ 10:16 AM

    • State changed from “open” to “out-of-date”

    Closing as out-of-date as there has been no response in several months. Will always re-open if it's commented on again.

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

Pages