Simplify Methods#webrat_adapter
It is unecessary to have a special case for the :rack mode.
This commit is contained in:
parent
f2b3b9891b
commit
042268c6a6
@ -20,12 +20,7 @@ module Webrat
|
|||||||
end
|
end
|
||||||
|
|
||||||
def webrat_adapter
|
def webrat_adapter
|
||||||
@_webrat_adapter ||=
|
@_webrat_adapter ||= Webrat.session_class.new(self)
|
||||||
if Webrat.configuration.mode == :rack
|
|
||||||
Webrat::RackSession.new(rack_test_session)
|
|
||||||
else
|
|
||||||
Webrat.session_class.new(self)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# all of these methods delegate to the @session, which should
|
# all of these methods delegate to the @session, which should
|
||||||
|
Loading…
Reference in New Issue
Block a user