From 042268c6a6301615cb563bba4f2947dcba0136c3 Mon Sep 17 00:00:00 2001 From: Simon Rozet Date: Wed, 24 Jun 2009 23:09:51 +0200 Subject: [PATCH] Simplify Methods#webrat_adapter It is unecessary to have a special case for the :rack mode. --- lib/webrat/core/methods.rb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/webrat/core/methods.rb b/lib/webrat/core/methods.rb index 01473ec..3c4df23 100644 --- a/lib/webrat/core/methods.rb +++ b/lib/webrat/core/methods.rb @@ -20,12 +20,7 @@ module Webrat end def webrat_adapter - @_webrat_adapter ||= - if Webrat.configuration.mode == :rack - Webrat::RackSession.new(rack_test_session) - else - Webrat.session_class.new(self) - end + @_webrat_adapter ||= Webrat.session_class.new(self) end # all of these methods delegate to the @session, which should