1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00

Added reset_sessions! method

This commit is contained in:
Jonas Nicklas 2009-11-15 23:20:37 +01:00
parent cd7c93f07b
commit 278074fdcd
2 changed files with 13 additions and 0 deletions

View file

@ -21,6 +21,10 @@ module Webcat
session_pool["#{current_driver}#{app.object_id}"] ||= Webcat::Session.new(current_driver, app) session_pool["#{current_driver}#{app.object_id}"] ||= Webcat::Session.new(current_driver, app)
end end
def reset_sessions!
@session_pool = nil
end
private private
def session_pool def session_pool

View file

@ -88,6 +88,15 @@ describe Webcat do
end end
end end
describe '.reset_sessions!' do
it "should clear any persisted sessions" do
object_id = Webcat.current_session.object_id
Webcat.current_session.object_id.should == object_id
Webcat.reset_sessions!
Webcat.current_session.object_id.should_not == object_id
end
end
describe 'the DSL' do describe 'the DSL' do
before do before do
@session = Webcat @session = Webcat