Rename :rack_test mode to :rack
This commit is contained in:
parent
3e7886ecab
commit
0a3b979772
@ -16,8 +16,8 @@ module Webrat
|
||||
end
|
||||
|
||||
def webrat_session
|
||||
if Webrat.configuration.mode == :rack_test
|
||||
@_webrat_session ||= ::Webrat::RackTestSession.new(rack_test_session)
|
||||
if Webrat.configuration.mode == :rack
|
||||
@_webrat_session ||= ::Webrat::RackSession.new(rack_test_session)
|
||||
else
|
||||
@_webrat_session ||= ::Webrat.session_class.new(self)
|
||||
end
|
||||
|
@ -24,8 +24,8 @@ module Webrat
|
||||
SinatraSession
|
||||
when :mechanize
|
||||
MechanizeSession
|
||||
when :rack_test
|
||||
RackTestSession
|
||||
when :rack
|
||||
RackSession
|
||||
else
|
||||
raise WebratError.new(<<-STR)
|
||||
Unknown Webrat mode: #{Webrat.configuration.mode.inspect}
|
||||
|
@ -1,5 +1,5 @@
|
||||
module Webrat
|
||||
class RackTestSession < Session
|
||||
class RackSession < Session
|
||||
|
||||
def initialize(rack_test_session) #:nodoc:
|
||||
super()
|
@ -6,7 +6,7 @@ require "rack/test"
|
||||
require File.dirname(__FILE__) + "/../../../../lib/webrat"
|
||||
|
||||
Webrat.configure do |config|
|
||||
config.mode = :rack_test
|
||||
config.mode = :rack
|
||||
end
|
||||
|
||||
class Test::Unit::TestCase
|
||||
|
Loading…
Reference in New Issue
Block a user